10000 bug #33927 Allow to set SameSite config to 'none' (ihmels) · symfony/symfony@ac422db · GitHub
[go: up one dir, main page]

Skip to content

Commit ac422db

Browse files
bug #33927 Allow to set SameSite config to 'none' (ihmels)
This PR was merged into the 4.3 branch. Discussion ---------- Allow to set SameSite config to 'none' | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #33926 | License | MIT | Doc PR | - Commits ------- eec7e8c Allow to set cookie_samesite to 'none'
2 parents 49dfa8a + eec7e8c commit ac422db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
542542
->scalarNode('cookie_domain')->end()
543543
->enumNode('cookie_secure')->values([true, false, 'auto'])->end()
544544
->booleanNode('cookie_httponly')->defaultTrue()->end()
545-
->enumNode('cookie_samesite')->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT])->defaultNull()->end()
545+
->enumNode('cookie_samesite')->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT, Cookie::SAMESITE_NONE])->defaultNull()->end()
546546
->booleanNode('use_cookies')->end()
547547
->scalarNode('gc_divisor')->end()
548548
->scalarNode('gc_probability')->defaultValue(1)->end()

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function addConfiguration(NodeDefinition $node)
144144
if ('secure' === $name) {
145145
$builder->enumNode($name)->values([true, false, 'auto'])->defaultValue('auto' === $value ? null : $value);
146146
} elseif ('samesite' === $name) {
147-
$builder->enumNode($name)->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT])->defaultValue($value);
147+
$builder->enumNode($name)->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT, Cookie::SAMESITE_NONE])->defaultValue($value);
148148
} elseif (\is_bool($value)) {
149149
$builder->booleanNode($name)->defaultValue($value);
150150
} else {

0 commit comments

Comments
 (0)
0