absent cookie file means logout, so change cookie id

This commit is contained in:
<bdauvergne@entrouvert.com> 1206635648 +0100 0001-01-01 00:00:00 +00:00
parent 9cc9126f21
commit 4fe204832f
1 changed files with 1 additions and 4 deletions

View File

@ -74,10 +74,7 @@ class LassoSPKitUtilsSession {
$valid = ereg("^[[:alnum:]]+$",$this->id);
if ($valid) {
$filepath = lassospkit_datadir() . "/cookie_session_" . $this->id;
if (! file_exists($filepath)) {
lassospkit_debuglog("$filepath does not exist but cookie exists.");
}
if (time()-filemtime($filepath) < self::$timeout) {
if (file_exists($filepath) && time()-filemtime($filepath) < self::$timeout) {
$content = @file_get_contents($filepath);
if ($content === FALSE) {
lassospkit_debuglog("cannot read $filepath");