sessions: clip max expiry value to a 32bit integer

This commit is contained in:
Andrew Dolgov 2017-07-13 08:57:07 +03:00
parent be61f1c45c
commit b465c28ee0

View file

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