Skip to content

Commit 16769a9

Browse files
author
Tod Beardsley
committed
Fixing path normalization
1 parent 2fa16f4 commit 16769a9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

modules/auxiliary/gather/apple_safari_webarchive_uxss.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,14 @@ def find_cached_scripts
764764

765765
# @return [String] the path to send data back to
766766
def collect_data_uri
767-
path = datastore["URI_PATH"]
768-
path = if not path or path.empty? then '/grab' end
769-
if path.starts_with '/' then path else "/#{path}" end
767+
path = datastore["URIPATH"]
768+
if path.nil? or path.empty?
769+
'/grab'
770+
elsif path =~ /^\//
771+
path
772+
else
773+
"/#{path}"
774+
end
770775
end
771776

772777
# @return [String] formatted http/https URL of the listener

0 commit comments

Comments
 (0)