diff options
author | Steven Barth <steven@midlink.org> | 2008-09-05 14:52:06 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-05 14:52:06 +0000 |
commit | c03bde275f48bfc1711a2fcae9b09e3b83fe27ec (patch) | |
tree | 0a1ebf1bbfbdbf157b895352636b009a0ee52cdb | |
parent | 47c07adf75ccdaec3f80aab009cf0819d24d4a3e (diff) |
Inprove sanity check for luci.sauth.read
-rw-r--r-- | libs/web/luasrc/sauth.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/web/luasrc/sauth.lua b/libs/web/luasrc/sauth.lua index b724bf2d2..894732dfa 100644 --- a/libs/web/luasrc/sauth.lua +++ b/libs/web/luasrc/sauth.lua @@ -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) |