Skip to content

Commit

Permalink
Merge a5eb065 into 5ca71b9
Browse files Browse the repository at this point in the history
  • Loading branch information
arneee committed Mar 2, 2021
2 parents 5ca71b9 + a5eb065 commit 57b79ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Slim/Http/Cookies.php
Expand Up @@ -135,7 +135,8 @@ protected function toHeader($name, array $properties)
$result .= '; HttpOnly';
}

if (isset($properties['samesite']) && in_array(strtolower($properties['samesite']), ['lax', 'strict'], true)) {
if (isset($properties['samesite'])
&& in_array(strtolower($properties['samesite']), ['lax', 'strict', 'none'], true)) {
// While strtolower is needed for correct comparison, the RFC doesn't care about case
$result .= '; SameSite=' . $properties['samesite'];
}
Expand Down

0 comments on commit 57b79ca

Please sign in to comment.