From: Andrew Dolgov Date: Thu, 13 Jul 2017 11:40:30 +0000 (+0300) Subject: rework previous 32 bit session stuff X-Git-Tag: 17.12~144 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=09628e1b1a71fb03933e7ff4d5eb9da7f83d5186;p=tt-rss.git rework previous 32 bit session stuff --- diff --git a/include/sessions.php b/include/sessions.php index adc973fe..0690ab7e 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -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") {