Skip to content

[Security][SecurityBundle] Use csrf_token_id instead of deprecated intention #16722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jakzal
Copy link
Contributor

@jakzal jakzal commented Nov 28, 2015

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #16720
License MIT
Doc PR -

@@ -299,7 +299,7 @@ private function createFirewall(ContainerBuilder $container, $id, $firewall, &$a
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.logout_listener'));
$listener->replaceArgument(3, array(
'csrf_parameter' => $firewall['logout']['csrf_parameter'],
'intention' => $firewall['logout']['csrf_token_id'],
'csrf_token_id' => $firewall['logout']['csrf_token_id'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong as the LogoutListener doesn't handle an intention option (or we need to change the listener too which probably is better): https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php#L62-L66

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm making changes to the security component just now :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jakzal jakzal force-pushed the security-bundle/csrf-token-id-bc-layer branch from b194912 to 76143f0 Compare November 28, 2015 11:16
@jakzal jakzal changed the title [WIP][SecurityBundle] Use csrf_token_id instead of deprecated intention [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention Nov 28, 2015
@jakzal
Copy link
Contributor Author

jakzal commented Nov 28, 2015

@xabbuh thanks for the review!

@nicolas-grekas there are some common changes made here and in the already merged #16692. Expect merge conflicts ;)

@jakzal jakzal force-pushed the security-bundle/csrf-token-id-bc-layer branch from 9985b7a to ae4d588 Compare November 28, 2015 11:33
@jakzal
Copy link
Contributor Author

jakzal commented Nov 28, 2015

I cleaned up the commits now. Ready to review.

@@ -6,6 +6,7 @@ CHANGELOG

* deprecated the `key` setting of `anonymous`, `remember_me` and `http_digest`
in favor of the `secret` setting.
* deprecated the `intention` firewall listener setting in favor of the `csrf_token_id`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change also documented in the upgrade file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it is ;)

@nicolas-grekas
Copy link
Member

👍 thanks!

@jakzal jakzal force-pushed the security-bundle/csrf-token-id-bc-layer branch from 8798527 to ac35350 Compare November 28, 2015 12:16
@xabbuh
Copy link
Member

xabbuh commented Nov 28, 2015

👍

Status: Reviewed

@fabpot
Copy link
Member

fabpot commented Nov 28, 2015

Thank you @jakzal.

@fabpot fabpot closed this Nov 28, 2015
fabpot added a commit that referenced this pull request Nov 28, 2015
…f deprecated intention (jakzal)

This PR was squashed before being merged into the 2.8 branch (closes #16722).

Discussion
----------

[Security][SecurityBundle] Use csrf_token_id instead of deprecated intention

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16720
| License       | MIT
| Doc PR        | -

Commits
-------

0450865 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention
@jakzal jakzal deleted the security-bundle/csrf-token-id-bc-layer branch November 28, 2015 15:45
This was referenced Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants