mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 14:14:30 +02:00
url.lua:remove_dot_components(): limit beginning-of-string double-dot corner case to prevent triple-dot activation and authority collision
This commit is contained in:
@ -94,7 +94,7 @@ local function remove_dot_components(path)
|
||||
path = path:gsub('[^/]+/%.%./*$', '')
|
||||
path = path:gsub('/%.%.$', '/')
|
||||
path = path:gsub('/%.$', '/')
|
||||
path = path:gsub('^/%.%.', '')
|
||||
path = path:gsub('^/%.%./', '/')
|
||||
return path
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user