From: Jo-Philipp Wich Date: Fri, 10 Apr 2020 19:03:19 +0000 (+0200) Subject: luci-base: uhttpd.lua: expose all CGI variables X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=465891ff0239b8fdafb737d01e3f05205a14319b;p=oweals%2Fluci.git luci-base: uhttpd.lua: expose all CGI variables Fixes: #3873 Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/luasrc/sgi/uhttpd.lua b/modules/luci-base/luasrc/sgi/uhttpd.lua index 2836bf00c..4cd3649c6 100644 --- a/modules/luci-base/luasrc/sgi/uhttpd.lua +++ b/modules/luci-base/luasrc/sgi/uhttpd.lua @@ -18,7 +18,17 @@ function handle_request(env) SCRIPT_NAME = env.SCRIPT_NAME:gsub("/+$", ""), SCRIPT_FILENAME = env.SCRIPT_NAME, SERVER_PROTOCOL = env.SERVER_PROTOCOL, - QUERY_STRING = env.QUERY_STRING + QUERY_STRING = env.QUERY_STRING, + DOCUMENT_ROOT = env.DOCUMENT_ROOT, + HTTPS = env.HTTPS, + REDIRECT_STATUS = env.REDIRECT_STATUS, + REMOTE_ADDR = env.REMOTE_ADDR, + REMOTE_NAME = env.REMOTE_NAME, + REMOTE_PORT = env.REMOTE_PORT, + REMOTE_USER = env.REMOTE_USER, + SERVER_ADDR = env.SERVER_ADDR, + SERVER_NAME = env.SERVER_NAME, + SERVER_PORT = env.SERVER_PORT } local k, v @@ -44,7 +54,7 @@ function handle_request(env) local req = luci.http.Request( renv, recv, luci.ltn12.sink.file(io.stderr) ) - + local x = coroutine.create(luci.dispatcher.httpdispatch) local hcache = { }