X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fsecurity%2FSessionManager.php;h=b8b8ab8d18ccad003f897c78072b12e94d410b22;hb=5dc4b8ab69c9dbe61312734f185066f018204c7b;hp=24e255283731aedb951d8624a7b2ec7dfc120136;hpb=ebf615173824a46de82fa97a165bcfd883db15ce;p=github%2Fshaarli%2FShaarli.git diff --git a/application/security/SessionManager.php b/application/security/SessionManager.php index 24e25528..b8b8ab8d 100644 --- a/application/security/SessionManager.php +++ b/application/security/SessionManager.php @@ -169,6 +169,9 @@ class SessionManager */ public function hasSessionExpired() { + if (empty($this->session['expires_on'])) { + return true; + } if (time() >= $this->session['expires_on']) { return true; } @@ -188,7 +191,7 @@ class SessionManager if ($this->conf->get('security.session_protection_disabled') === true) { return false; } - if ($this->session['ip'] == $clientIpId) { + if (isset($this->session['ip']) && $this->session['ip'] === $clientIpId) { return false; } return true;