🐶 Sync 2025-11-02 14:26:26
This commit is contained in:
20
lua-neturl/patches/010-userinfo-regex.patch
Normal file
20
lua-neturl/patches/010-userinfo-regex.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/lib/net/url.lua
|
||||
+++ b/lib/net/url.lua
|
||||
@@ -340,7 +340,7 @@ function M:setAuthority(authority)
|
||||
self.password = v
|
||||
return ''
|
||||
end)
|
||||
- if string.find(userinfo, "^[%w%+%.]+$") then
|
||||
+ if string.find(userinfo, "^[%p%w%+%.]+$") then
|
||||
self.user = userinfo
|
||||
else
|
||||
-- incorrect userinfo
|
||||
@@ -369,7 +369,7 @@ function M.parse(url)
|
||||
comp.fragment = v
|
||||
return ''
|
||||
end)
|
||||
- url =url:gsub('^([%w][%w%+%-%.]*)%:', function(v)
|
||||
+ url =url:gsub('^([%w][%w%+%-%_%.]*)%:', function(v)
|
||||
comp.scheme = v:lower()
|
||||
return ''
|
||||
end)
|
||||
Reference in New Issue
Block a user