When testing the luci-rpc authnetication, avoid clobbering the HTTP
post request body.
Fixes: #3470
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
elseif subname == "rpc" and subnode.module == "luci.controller.rpc" then
spec.auth = {
login = false,
- methods = { "param:auth", "cookie:sysauth" }
+ methods = { "query:auth", "cookie:sysauth" }
}
elseif subnode.module == "luci.controller.admin.uci" then
spec.auth = {
sid = http.getcookie(auth_param)
elseif auth_type == "param" then
sid = http.formvalue(auth_param)
+ elseif auth_type == "query" then
+ sid = http.formvalue(auth_param, true)
end
return session_retrieve(sid)