diff --git a/dojo/tools/nuclei/parser.py b/dojo/tools/nuclei/parser.py index 039dd4a6ab7..7ef468c519c 100644 --- a/dojo/tools/nuclei/parser.py +++ b/dojo/tools/nuclei/parser.py @@ -155,7 +155,10 @@ def get_findings(self, filename, test): ) if locations_enabled(): - dupe_host = (urlparse(matched).hostname or "") if matched else "" + # Prepend "//" for protocol-less URLs so urlparse extracts + # the hostname correctly (mirrors LocationData construction). + parseable = matched if "://" in matched else "//" + matched + dupe_host = (urlparse(parseable).hostname or "") if matched else "" else: # TODO: Delete this after the move to Locations dupe_host = str(location.host) if location else ""