Make sure we generate a XSRF token for events#2903
Open
nitriques wants to merge 1 commit intosymphonycms:2.7.xfrom
Open
Make sure we generate a XSRF token for events#2903nitriques wants to merge 1 commit intosymphonycms:2.7.xfrom
nitriques wants to merge 1 commit intosymphonycms:2.7.xfrom
Conversation
This commit simply checks, for each event attached to the page, if there is a filter with `xsrf` in its name. If so, it will make sure that the token is generated. Hopefully, this fixes symphonycms#2173 for good.
michael-e
approved these changes
May 14, 2019
Member
michael-e
left a comment
There was a problem hiding this comment.
I did some tests, and this seems to work fine. It will potentially reduce the number of generated sessions. However, we should be aware that those sessions — once generated — will stay. There is no mechanism to remove old/superfluous XSRF tokens from sessions, so the sessions won't be cleaned up. (Symphony is not very good in cleaning up sessions anyway.)
IMHO it would add a lot of complexity to properly clean up tokens and sessions, and anyway the main issue is fixed here. So "thumbs up"!
fhamon
approved these changes
May 20, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit simply checks, for each event attached to the page, if there
is a filter with
xsrfin its name. If so, it will make sure that thetoken is generated.
Hopefully, this fixes #2173 for good.