|
@@ -352,7 +352,7 @@ local function processData(szType, content)
|
|
|
if idx_sp > 0 then
|
|
|
alias = UrlDecode(content:sub(idx_sp + 1))
|
|
|
end
|
|
|
- local info = content:sub(1, idx_sp > 0 and idx_sp - 1 or #content)
|
|
|
+ local info = content:sub(1, idx_sp > 0 and idx_sp - 1 or #content):gsub("/%?", "?")
|
|
|
|
|
|
-- 拆 base64 主体和 ? 参数部分
|
|
|
local uri_main, query_str = info:match("^([^?]+)%??(.*)$")
|
|
@@ -407,6 +407,20 @@ local function processData(szType, content)
|
|
|
method = userinfo:sub(1, split_pos - 1)
|
|
|
password = userinfo:sub(split_pos + 1)
|
|
|
|
|
|
+ -- 判断密码是否经过url编码
|
|
|
+ local function isURLEncodedPassword(pwd)
|
|
|
+ if not pwd:find("%%[0-9A-Fa-f][0-9A-Fa-f]") then
|
|
|
+ return false
|
|
|
+ end
|
|
|
+ local ok, decoded = pcall(UrlDecode, pwd)
|
|
|
+ return ok and urlEncode(decoded) == pwd
|
|
|
+ end
|
|
|
+
|
|
|
+ local decoded = UrlDecode(password)
|
|
|
+ if isURLEncodedPassword(password) and decoded then
|
|
|
+ password = decoded
|
|
|
+ end
|
|
|
+
|
|
|
-- 解析服务器地址和端口(兼容 IPv6)
|
|
|
if host_port:find("^%[.*%]:%d+$") then
|
|
|
server, port = host_port:match("^%[(.*)%]:(%d+)$")
|