projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47c07ad
)
Inprove sanity check for luci.sauth.read
author
Steven Barth
<steven@midlink.org>
Fri, 5 Sep 2008 14:52:06 +0000
(14:52 +0000)
committer
Steven Barth
<steven@midlink.org>
Fri, 5 Sep 2008 14:52:06 +0000
(14:52 +0000)
libs/web/luasrc/sauth.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/sauth.lua
b/libs/web/luasrc/sauth.lua
index b724bf2d28e13db16af0d2da2e13935433c20553..894732dfaf9582dc871424ecd8b0d266b6cd980d 100644
(file)
--- 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)