Inprove sanity check for luci.sauth.read

This commit is contained in:
Steven Barth 2008-09-05 14:52:06 +00:00
parent 47c07adf75
commit c03bde275f

View file

@ -57,8 +57,11 @@ end
-- @param id Session identifier
-- @return Session data
function read(id)
if not id then
return
end
clean()
if not id or not sane(sessionpath .. "/" .. id) then
if not sane(sessionpath .. "/" .. id) then
return
end
return luci.fs.readfile(sessionpath .. "/" .. id)