From b9f6fd215a8f522733caedcb4d6d6b0c6e55103e Mon Sep 17 00:00:00 2001 From: Okash Khawaja Date: Tue, 12 Apr 2016 00:04:21 +0100 Subject: [PATCH] URL-decode user password before adding to authorization header. --- src/http.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http.lua b/src/http.lua index f2fff01..a386165 100644 --- a/src/http.lua +++ b/src/http.lua @@ -222,7 +222,8 @@ local function adjustheaders(reqt) -- if we have authentication information, pass it along if reqt.user and reqt.password then lower["authorization"] = - "Basic " .. (mime.b64(reqt.user .. ":" .. reqt.password)) + "Basic " .. (mime.b64(reqt.user .. ":" .. + url.unescape(reqt.password))) end -- if we have proxy authentication information, pass it along local proxy = reqt.proxy or _M.PROXY