Skip to content

Commit

Permalink
Fixed wrong CSRF token storage being wired (see #1625)
Browse files Browse the repository at this point in the history
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #1491
| Docs PR or issue | -

If not specified explicitly, Symfony will autowire to the default CSRF token storage which is the session one :)

Commits
-------

95f4dbc Fixed FrontendController using session csrf token storage instead of our own memory token storage
  • Loading branch information
Toflar committed May 1, 2020
1 parent 9778efd commit 1810310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions core-bundle/src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ services:
Contao\CoreBundle\Controller\FrontendController:
tags:
- controller.service_arguments
- { name: 'container.service_subscriber', id: 'contao.csrf.token_manager' }

Contao\CoreBundle\Controller\FrontendModule\TwoFactorController:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ public function testRegistersTheFrontendController(): void
'controller.service_arguments' => [
[],
],
'container.service_subscriber' => [
['id' => 'contao.csrf.token_manager'],
],
],
$definition->getTags()
);
Expand Down

0 comments on commit 1810310

Please sign in to comment.