From 9b50dd9cba080ffd37a427e080785d56e2bba5c9 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 11 Sep 2009 10:46:06 +0000 Subject: [PATCH] Fix requestpath, export authuser --- libs/web/luasrc/dispatcher.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index 6d4433975..ad4f24dc7 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -208,7 +208,7 @@ function dispatch(request) end end - ctx.requestpath = freq + ctx.requestpath = ctx.requestpath or freq ctx.path = preq if track.i18n then @@ -306,6 +306,7 @@ function dispatch(request) end luci.http.header("Set-Cookie", "sysauth=" .. sid.."; path="..build_url()) ctx.authsession = sid + ctx.authuser = user end else luci.http.status(403, "Forbidden") @@ -313,6 +314,7 @@ function dispatch(request) end else ctx.authsession = sess + ctx.authuser = user end end -- 2.25.1