Fix error log on PHP 7.2
Fixes following error in the logs: "ini_set(): A session is active. You cannot change the session module's ini settings at this time" Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
14c83e415c
commit
b19fae2629
|
@ -412,6 +412,10 @@ class OC {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function initSession() {
|
public static function initSession() {
|
||||||
|
if(self::$server->getRequest()->getServerProtocol() === 'https') {
|
||||||
|
ini_set('session.cookie_secure', true);
|
||||||
|
}
|
||||||
|
|
||||||
// prevents javascript from accessing php session cookies
|
// prevents javascript from accessing php session cookies
|
||||||
ini_set('session.cookie_httponly', true);
|
ini_set('session.cookie_httponly', true);
|
||||||
|
|
||||||
|
@ -663,9 +667,6 @@ class OC {
|
||||||
self::checkInstalled();
|
self::checkInstalled();
|
||||||
|
|
||||||
OC_Response::addSecurityHeaders();
|
OC_Response::addSecurityHeaders();
|
||||||
if(self::$server->getRequest()->getServerProtocol() === 'https') {
|
|
||||||
ini_set('session.cookie_secure', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
self::performSameSiteCookieProtection();
|
self::performSameSiteCookieProtection();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue