projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
abef50b
)
libs/web: adapt dispatcher to sauth api changes
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 8 Aug 2012 09:48:50 +0000
(09:48 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 8 Aug 2012 09:48:50 +0000
(09:48 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index
7c77f2e
..
9c0bf60
100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-352,9
+352,6
@@
function dispatch(request)
local user
if sdat then
local user
if sdat then
- sdat = loadstring(sdat)
- setfenv(sdat, {})
- sdat = sdat()
if not verifytoken or ctx.urltoken.stok == sdat.token then
user = sdat.user
end
if not verifytoken or ctx.urltoken.stok == sdat.token then
user = sdat.user
end
@@
-376,11
+373,12
@@
function dispatch(request)
local sid = sess or luci.sys.uniqueid(16)
if not sess then
local token = luci.sys.uniqueid(16)
local sid = sess or luci.sys.uniqueid(16)
if not sess then
local token = luci.sys.uniqueid(16)
- sauth.write(sid, util.get_bytecode({
+ sauth.reap()
+ sauth.write(sid, {
user=user,
token=token,
secret=luci.sys.uniqueid(16)
user=user,
token=token,
secret=luci.sys.uniqueid(16)
- })
)
+ })
ctx.urltoken.stok = token
end
luci.http.header("Set-Cookie", "sysauth=" .. sid.."; path="..build_url())
ctx.urltoken.stok = token
end
luci.http.header("Set-Cookie", "sysauth=" .. sid.."; path="..build_url())