libs/web: Add an additional sanity check to Session IDs

This commit is contained in:
Steven Barth 2008-08-11 09:59:44 +00:00
parent 4bb4304974
commit 673b4e1698

View file

@ -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