Inprove sanity check for luci.sauth.read
This commit is contained in:
parent
47c07adf75
commit
c03bde275f
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue