You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ CHANGELOG
14
14
* Deprecate making `cache.app` adapter taggable, use the `cache.app.taggable` adapter instead
15
15
* Enable `json_decode_detailed_errors` in the default serializer context in debug mode by default when `seld/jsonlint` is installed
16
16
* Register `Symfony\Component\Serializer\NameConverter\SnakeCaseToCamelCaseNameConverter` as a service named `serializer.name_converter.snake_case_to_camel_case` if available
17
+
* Add `framework.csrf_protection.stateless_token_ids`, `.cookie_name`, and `.check_header` options to use stateless headers/cookies-based CSRF protection
@@ -1815,8 +1819,7 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild
1815
1819
if (!class_exists(\Symfony\Component\Security\Csrf\CsrfToken::class)) {
1816
1820
thrownewLogicException('CSRF support cannot be enabled as the Security CSRF component is not installed. Try running "composer require symfony/security-csrf".');
1817
1821
}
1818
-
1819
-
if (!$this->isInitializedConfigEnabled('session')) {
1822
+
if (!$config['stateless_token_ids'] && !$this->isInitializedConfigEnabled('session')) {
1820
1823
thrownew \LogicException('CSRF protection needs sessions to be enabled.');
1821
1824
}
1822
1825
@@ -1826,6 +1829,24 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild
0 commit comments