libs/web: Add an additional sanity check to Session IDs
This commit is contained in:
parent
4bb4304974
commit
673b4e1698
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue