diff --git a/modules/consent/lib/Consent/Store/Cookie.php b/modules/consent/lib/Consent/Store/Cookie.php index fa24d6ebeb0f2fd71a8c47895e7db3555b77d1cd..ad448c799149215068942357ae4ed119ce0589af 100644 --- a/modules/consent/lib/Consent/Store/Cookie.php +++ b/modules/consent/lib/Consent/Store/Cookie.php @@ -279,18 +279,12 @@ class Cookie extends \SimpleSAML\Module\consent\Store $globalConfig = \SimpleSAML\Configuration::getInstance(); $params = array( - 'lifetime' => (90*24*60*60), + 'lifetime' => 7776000, // (90*24*60*60) 'path' => ($globalConfig->getBasePath()), - 'httponly' => false, + 'httponly' => true, + 'secure' => \SimpleSAML\Utils\HTTP::isHTTPS(), ); - if (\SimpleSAML\Utils\HTTP::isHTTPS()) { - // Enable secure cookie for https-requests - $params['secure'] = true; - } else { - $params['secure'] = false; - } - \SimpleSAML\Utils\HTTP::setCookie($name, $value, $params, false); } }