mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 04:09:01 +00:00
Disallow any backslashes.
This commit is contained in:
@@ -197,7 +197,7 @@ function is_path_valid(resource)
|
||||
return false
|
||||
end
|
||||
|
||||
if first_char == "\\" then
|
||||
if resource:find("\\") then
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -206,11 +206,6 @@ function is_path_valid(resource)
|
||||
return false
|
||||
end
|
||||
|
||||
-- \.. and/or ..\?
|
||||
if resource:find("\\%.%.\\?") or resource:find("\\?%.%.\\") then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user