X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/10.7.0_2021-03-08/38458
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Possible values: Strict, Lax or None
Setting the same site cookie to none is necessary in case of OpenID Connect.

https://github.com/owncloud/core/pull/38458
https://github.com/owncloud/core/pull/38477
2 changes: 1 addition & 1 deletion config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite#values
*/

'http.cookie.samesite' => 'strict',
'http.cookie.samesite' => 'Strict',

/**
* Define the directory where the skeleton files are located
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Session/CryptoWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function __construct(IConfig $config,
if (\version_compare(PHP_VERSION, '7.3.0') === -1) {
\setcookie(self::COOKIE_NAME, $this->passphrase, 0, $webRoot, '', $secureCookie, true);
} else {
$samesite = $config->getSystemValue('http.cookie.samesite', 'strict');
$samesite = $config->getSystemValue('http.cookie.samesite', 'Strict');
$options = [
"expires" => 0,
"path" => $webRoot,
Expand Down
5 changes: 5 additions & 0 deletions lib/private/Session/Internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ private function start() {
//try to set the session lifetime
$sessionLifeTime = self::getSessionLifeTime();
@\ini_set('session.gc_maxlifetime', (string)$sessionLifeTime);

if (\version_compare(PHP_VERSION, '7.3.0') !== -1) {
$samesite = \OC::$server->getConfig()->getSystemValue('http.cookie.samesite', 'Strict');
\ini_set('session.cookie_samesite', $samesite);
}
}
\session_start();
}
Expand Down
X Tutup