mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 14:14:30 +02:00
url.lua:remove_dot_components(): empty path component double-dot corner case
This commit is contained in:
@ -87,6 +87,10 @@ local function remove_dot_components(path)
|
||||
local was = path
|
||||
path = path:gsub('/%./', '/', 1)
|
||||
until path == was
|
||||
repeat
|
||||
local was = path
|
||||
path = path:gsub('//%.%./([^/]+)', '/%1', 1)
|
||||
until path == was
|
||||
repeat
|
||||
local was = path
|
||||
path = path:gsub('[^/]+/%.%./([^/]+)', '%1', 1)
|
||||
|
Reference in New Issue
Block a user