Skip to content
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

Fix SessionTokenStorage reuse with Request #41881

Merged
merged 1 commit into from
Jun 30, 2021
Merged

Conversation

jderusse
Copy link
Member

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41757
License MIT
Doc PR -

When the CsrfTokenManager is used BEFORE a request is sent, the SessionTokenStorage creates a fake session to stores the token.
But if the Storage is, then, called with a real request, the fake session is not used anymore. This is an issue for people using CSRF tests in tests. Asm they are not able to use the security.csrf.token_manager service.

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

A test case would be nice though.

@jderusse
Copy link
Member Author

tests added

1 similar comment
@jderusse
Copy link
Member Author

tests added

@fabpot
Copy link
Member

fabpot commented Jun 30, 2021

Thank you @jderusse.

@fabpot fabpot merged commit e1c020a into symfony:5.3 Jun 30, 2021
@fabpot fabpot mentioned this pull request Jun 30, 2021
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.

None yet

6 participants