From c03bde275f48bfc1711a2fcae9b09e3b83fe27ec Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 5 Sep 2008 14:52:06 +0000 Subject: [PATCH] Inprove sanity check for luci.sauth.read --- libs/web/luasrc/sauth.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.25.1