Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[SecurityBundle] Stop delete_cookies keys from being normalized#24018
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[SecurityBundle] Stop delete_cookies keys from being normalized#24018
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ro0NL left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Related to8d03332
thewilkybarkid commentedAug 29, 2017
AppVeyor failure looks unrelated. |
chalasr commentedAug 29, 2017
As for#21718 doing this now is a BC break, people might rely on the current behavior and/or workaround it on their side. |
stof commentedAug 29, 2017
A BC layer could be to add the underscore version of cookie names in the list whenever a dashed one is here, to keep clearing the underscore version too (it would then clear 2 cookies). |
chalasr commentedAug 29, 2017
@thewilkybarkid Would you mind looking at@stof's suggestion? I can do it if you don't. |
chalasr commentedAug 29, 2017
This is for 3.4 as it is a behavior change and should include deprecations, branch needs to be rebased and PR retargeted. |
thewilkybarkid commentedAug 30, 2017
Don't see how this is a BC break? I don't think it's possible to rely on the current behaviour (since it's mangling the name), and if you have an existing workaround then that would continue to work? If you want underscores if your cookie name why wouldn't you have used that already? |
chalasr commentedAug 30, 2017
Dunno, probably no viable reason. But fact is that if one set a name with dashes and ends up with underscores, one could just forgot about the name set in the config and implicitly rely on this behavior. For the same input the final value will be different than before, that is a behavior change which can break. |
thewilkybarkid commentedSep 1, 2017
But why prioritise someone who's incorrectly configured the cookie name here (using dashes when they meant underscores) over someone who's being bitten by this bug (probably without realising)? |
chalasr commentedSep 2, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@thewilkybarkid That is where I disagree. Incorrectly or not, the one who did configure it could be a different person that the one who rely on the unexpected result, thinking it's expected, letting untouched and just dealing with underscores... Breaking (edge) cases are easy to imagine here. |
weaverryan commentedSep 26, 2017
I agree with Stof and@chalasr. This is obviously a worthwhile fix - definitely was a bug/mistake originally. But we should add the BC layer. @thewilkybarkid Feature freeze is this weekend? Would you have time to update your PR before then? Thanks! |
nicolas-grekas commentedOct 8, 2017
Moving to 4.1. Rebase on master might be needed, where PHP 7.1 features can be used btw. |
javiereguiluz commentedJul 4, 2018
This is tricky ... but Symfony's policy in similar situations has always been:
So I'd say, this is a bug fix and not a BC break. |
chalasr commentedJul 4, 2018
Still -1 for me without BC layer, not worth the breaking change as there is a valid way to avoid this behavior (by specifying |
thewilkybarkid commentedJul 4, 2018
Still don't agree that it needs a BC layer since it's a bug that doesn't have behaviour that can be relied on. But I'd much rather the bug is fixed than having this left open, so do whatever's needed to have it resolved. |
chalasr commentedFeb 11, 2019
Closing in favor of#30111, thank you for rising the issue. |
…okie names (javiereguiluz)This PR was squashed before being merged into the 4.3-dev branch (closes#30111).Discussion----------[SecurityBundle] Deprecate the normalization of the cookie names| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -This is an alternative solution to#24018 providing a BC layer until Symfony 5.0.Commits-------36c5df4 [SecurityBundle] Deprecate the normalization of the cookie names
Currently the cookie names inside
delete_cookiesare normalized, so using YAML a cookie with the name 'foo-bar' becomes 'foo_bar', and so isn't deleted.