From e2e1cf54974c5276ba8e874c2029857e8f97629a Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 5 Sep 2008 14:28:36 +0000 Subject: Fixed some minor session handling issues --- libs/web/luasrc/dispatcher.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/web/luasrc/dispatcher.lua') diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index 7692dd2262..296c7624dd 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -182,7 +182,7 @@ function dispatch(request) local def = (type(track.sysauth) == "string") and track.sysauth local accs = def and {track.sysauth} or track.sysauth - local sess = luci.http.getcookie("sysauth") + local sess = ctx.authsession or luci.http.getcookie("sysauth") sess = sess and sess:match("^[A-F0-9]+$") local user = sauth.read(sess) @@ -197,6 +197,7 @@ function dispatch(request) if not sess then sauth.write(sid, user) end + ctx.authsession = sid end else luci.http.status(403, "Forbidden") -- cgit v1.2.3