Skip to content

Commit

Permalink
Set samesite=strict coockies - will work starting php 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed May 25, 2020
1 parent 61a14a8 commit 6e4ee95
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/private/Session/CryptoWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ public function __construct(IConfig $config,
if ($webRoot === '') {
$webRoot = '/';
}
\setcookie(self::COOKIE_NAME, $this->passphrase, 0, $webRoot, '', $secureCookie, true);
$options = [
"expires" => 0,
"path" => $webRoot,
"domain" => '',
"secure" => $secureCookie,
"httponly" => true,
"samesite" => 'strict'
];

\setcookie(self::COOKIE_NAME, $this->passphrase, $options);
}
}
}
Expand Down

0 comments on commit 6e4ee95

Please sign in to comment.