summaryrefslogtreecommitdiffstats
path: root/lib/session.lua
diff options
context:
space:
mode:
authorMike Mason <ms13sp@gmail.com>2008-03-07 16:08:26 +0000
committerMike Mason <ms13sp@gmail.com>2008-03-07 16:08:26 +0000
commitc05042ed54795d60ee83b21d1985ff5cd7b70df2 (patch)
tree8eaeb942215b88c7c0542dd3a994d209403bac60 /lib/session.lua
parent7206c3c6fae411813d06a7de1c8a7e504081d6fc (diff)
downloadacf-core-c05042ed54795d60ee83b21d1985ff5cd7b70df2.tar.bz2
acf-core-c05042ed54795d60ee83b21d1985ff5cd7b70df2.tar.xz
If the sessionid was used after the expire time the browser would give a funny error. Hopefully fixed...
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@827 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/session.lua')
-rw-r--r--lib/session.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/session.lua b/lib/session.lua
index 27db90f..18a0c7b 100644
--- a/lib/session.lua
+++ b/lib/session.lua
@@ -154,9 +154,9 @@ end
--need to see if this is a "real"-user session or just a temp one.
check_session = function (sessionpath, session )
- if session == nil then return "an unknown user" end
-
+ if session == nil then return "an unknown user" end
local fullpath = sessionpath .. "/session." .. session
+ if posix.stat(fullpath) == nil then return "an unknown user" end
if type(session) ~= "string" then return nil end
local s = string.gsub (session, "[^" .. b64 .. "]", "")
if s ~= session then