mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 12:28:21 +01:00
URL-decode user password before adding to authorization header.
This commit is contained in:
parent
9984741d94
commit
b9f6fd215a
@ -222,7 +222,8 @@ local function adjustheaders(reqt)
|
|||||||
-- if we have authentication information, pass it along
|
-- if we have authentication information, pass it along
|
||||||
if reqt.user and reqt.password then
|
if reqt.user and reqt.password then
|
||||||
lower["authorization"] =
|
lower["authorization"] =
|
||||||
"Basic " .. (mime.b64(reqt.user .. ":" .. reqt.password))
|
"Basic " .. (mime.b64(reqt.user .. ":" ..
|
||||||
|
url.unescape(reqt.password)))
|
||||||
end
|
end
|
||||||
-- if we have proxy authentication information, pass it along
|
-- if we have proxy authentication information, pass it along
|
||||||
local proxy = reqt.proxy or _M.PROXY
|
local proxy = reqt.proxy or _M.PROXY
|
||||||
|
Loading…
Reference in New Issue
Block a user