summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-12-12 15:45:25 +0100
committerGitHub <noreply@github.com>2017-12-12 15:45:25 +0100
commit2943b54f98c53ded616ae9ab3ebe2c6b8e47f762 (patch)
tree7198c0c09b43b8eccbce42e1ad6e95b436e1c163 /lib
parent175e1a544236cd5314133041aaa236b657cb5b28 (diff)
parentb19fae262994a847fa6f74fe629140ba11daca80 (diff)
downloadnextcloud-server-2943b54f98c53ded616ae9ab3ebe2c6b8e47f762.tar.gz
nextcloud-server-2943b54f98c53ded616ae9ab3ebe2c6b8e47f762.zip
Merge pull request #7466 from nextcloud/fix-php7.2-session-init
Fix error log on PHP 7.2
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index f6b4f5555eb..d0672785cef 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -412,6 +412,10 @@ class OC {
}
public static function initSession() {
+ if(self::$server->getRequest()->getServerProtocol() === 'https') {
+ ini_set('session.cookie_secure', true);
+ }
+
// prevents javascript from accessing php session cookies
ini_set('session.cookie_httponly', true);
@@ -663,9 +667,6 @@ class OC {
self::checkInstalled();
OC_Response::addSecurityHeaders();
- if(self::$server->getRequest()->getServerProtocol() === 'https') {
- ini_set('session.cookie_secure', true);
- }
self::performSameSiteCookieProtection();