]> git.wh0rd.org - tt-rss.git/commitdiff
rework previous 32 bit session stuff
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 13 Jul 2017 11:40:30 +0000 (14:40 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 13 Jul 2017 11:40:30 +0000 (14:40 +0300)
include/sessions.php

index adc973fe7fd1783b01ea61cc67718afc0fd42eb5..0690ab7ed0a84b5924dcbf332ddf1f0c5b365b95 100644 (file)
@@ -9,7 +9,7 @@
        require_once "lib/gettext/gettext.inc";
        require_once "version.php";
 
-       $session_expire = max(SESSION_COOKIE_LIFETIME, 86400) & 0xFFFFFFFF; // clip to 32 bit
+       $session_expire = min(2147483647 - time() - 1, max(SESSION_COOKIE_LIFETIME, 86400));
        $session_name = (!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME;
 
        if (@$_SERVER['HTTPS'] == "on") {