From: Steven Barth Date: Fri, 5 Sep 2008 14:52:06 +0000 (+0000) Subject: Inprove sanity check for luci.sauth.read X-Git-Tag: 0.8.0~143 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c03bde275f48bfc1711a2fcae9b09e3b83fe27ec;p=project%2Fluci.git Inprove sanity check for luci.sauth.read --- diff --git a/libs/web/luasrc/sauth.lua b/libs/web/luasrc/sauth.lua index b724bf2d28..894732dfaf 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)