Skip to content

Commit 695c00a

Browse files
committed
merged branch jmikola/patch-1 (PR symfony#3507)
Commits ------- 654beee [Security] Document CSRF protection for LogoutListener Discussion ---------- [Security] Document CSRF protection for LogoutListener --------------------------------------------------------------------------- by Seldaek at 2012-03-05T18:01:36Z I haven't checked, but for such things I find it way easier to find them in cookbooks than in the changelog - if you don't mind reformatting/copy that in a docs PR it'd be great.
2 parents 97dc9c0 + 654beee commit 695c00a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CHANGELOG-2.1.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,28 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
103103
fired on authentication success/failure, regardless of authentication method,
104104
events are defined in new event class: `Symfony\Component\Security\Core\AuthenticationEvents`.
105105

106+
* Added optional CSRF protection to LogoutListener:
107+
108+
``` yaml
109+
security:
110+
firewalls:
111+
default:
112+
logout:
113+
path: /logout_path
114+
target: /
115+
csrf_parameter: _csrf_token # Optional (defaults to "_csrf_token")
116+
csrf_provider: form.csrf_provider # Required to enable protection
117+
intention: logout # Optional (defaults to "logout")
118+
```
119+
120+
If the LogoutListener has CSRF protection enabled but cannot validate a token,
121+
then a LogoutException will be thrown.
122+
123+
* Added `logout_url` templating helper and Twig extension, which may be used to
124+
generate logout URL's within templates. The security firewall's config key
125+
must be specified. If a firewall's logout listener has CSRF protection
126+
enabled, a token will be automatically added to the generated URL.
127+
106128
### SwiftmailerBundle
107129

108130
* This bundle has been moved to its own repository (https://github.com/symfony/SwiftmailerBundle)

0 commit comments

Comments
 (0)