libs/web: Even more sanity checks
This commit is contained in:
parent
f83bb9996b
commit
fdce917da5
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,7 @@ $Id$
|
||||||
module("luci.sauth", package.seeall)
|
module("luci.sauth", package.seeall)
|
||||||
require("luci.fs")
|
require("luci.fs")
|
||||||
require("luci.util")
|
require("luci.util")
|
||||||
|
require("luci.sys")
|
||||||
require("luci.config")
|
require("luci.config")
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +66,8 @@ end
|
||||||
--- Check whether Session environment is sane.
|
--- Check whether Session environment is sane.
|
||||||
-- @return Boolean status
|
-- @return Boolean status
|
||||||
function sane()
|
function sane()
|
||||||
return luci.fs.stat(sessionpath, "mode") == "rwx------"
|
return luci.sys.process.info("uid") == luci.fs.stat(sessionpath, "uid")
|
||||||
|
and luci.fs.stat(sessionpath, "mode") == "rwx------"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue