Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8bac3d6

Browse filesBrowse files
authored
Allow set 'None' on samesite cookie flag
Allow set samesite cookie flag to 'None' value
1 parent c717083 commit 8bac3d6
Copy full SHA for 8bac3d6

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎src/Symfony/Component/HttpFoundation/Cookie.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Cookie.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Cookie
2828
private $raw;
2929
private $sameSite;
3030

31+
const SAMESITE_NONE = 'none';
3132
const SAMESITE_LAX = 'lax';
3233
const SAMESITE_STRICT = 'strict';
3334

@@ -128,7 +129,7 @@ public function __construct($name, $value = null, $expire = 0, $path = '/', $dom
128129
$sameSite = strtolower($sameSite);
129130
}
130131

131-
if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, null], true)) {
132+
if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, self::SAMESITE_NONE, null], true)) {
132133
throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.');
133134
}
134135

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.