projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bb4304
)
libs/web: Add an additional sanity check to Session IDs
author
Steven Barth
<steven@midlink.org>
Mon, 11 Aug 2008 09:59:44 +0000
(09:59 +0000)
committer
Steven Barth
<steven@midlink.org>
Mon, 11 Aug 2008 09:59:44 +0000
(09:59 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index b74c5bdc25afff419f909d768a85c6f4829e4584..ca507bebdf7fdb648e9d6830401de9a522f73b8f 100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-172,7
+172,8
@@
function dispatch(request)
local authen = authenticator[track.sysauth_authenticator]
local def = (type(track.sysauth) == "string") and track.sysauth
local accs = def and {track.sysauth} or track.sysauth
- local user = luci.sauth.read(luci.http.getcookie("sysauth"))
+ local sess = luci.http.getcookie("sysauth"):match("^[A-F0-9]+$")
+ local user = luci.sauth.read(sess)
if not luci.util.contains(accs, user) then
if authen then