summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/http.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-22 12:03:23 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-22 12:03:23 +0200
commit82abf9add923e5edd1d6abb07314f16f9167978f (patch)
treec829fa4a8b9beabe5d049a74cc1ddb6f0fbac917 /modules/luci-base/luasrc/http.lua
parent5ef51b2abe2f3ec967abc1d4e37f4454ceaeed14 (diff)
luci-base: decode plus signs in x-www-form-urlencoded POST data
Depends on 5ef51b2ab ("lucihttp: update to latest HEAD"). Fixes #1755. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/http.lua')
-rw-r--r--modules/luci-base/luasrc/http.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/http.lua b/modules/luci-base/luasrc/http.lua
index 29edb4470..56d006482 100644
--- a/modules/luci-base/luasrc/http.lua
+++ b/modules/luci-base/luasrc/http.lua
@@ -443,16 +443,16 @@ function urldecode_message_body(src, msg)
if what == parser.TUPLE then
name, value = nil, nil
elseif what == parser.NAME then
- name = lhttp.urldecode(buffer)
+ name = lhttp.urldecode(buffer, lhttp.DECODE_PLUS)
elseif what == parser.VALUE and name then
local val = msg.params[name]
if type(val) == "table" then
- val[#val+1] = lhttp.urldecode(buffer) or ""
+ val[#val+1] = lhttp.urldecode(buffer, lhttp.DECODE_PLUS) or ""
elseif val ~= nil then
- msg.params[name] = { val, lhttp.urldecode(buffer) or "" }
+ msg.params[name] = { val, lhttp.urldecode(buffer, lhttp.DECODE_PLUS) or "" }
else
- msg.params[name] = lhttp.urldecode(buffer) or ""
+ msg.params[name] = lhttp.urldecode(buffer, lhttp.DECODE_PLUS) or ""
end
elseif what == parser.ERROR then
err = buffer