Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Conversation

@thewilkybarkid
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

Currently the cookie names insidedelete_cookies are normalized, so using YAML a cookie with the name 'foo-bar' becomes 'foo_bar', and so isn't deleted.

Copy link
Contributor

@ro0NLro0NL left a comment

Choose a reason for hiding this comment

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

Related to8d03332

@thewilkybarkid
Copy link
ContributorAuthor

AppVeyor failure looks unrelated.

@chalasr
Copy link
Member

As for#21718 doing this now is a BC break, people might rely on the current behavior and/or workaround it on their side.
The BC break is more impactful here since the changed value is also used in prod env.
I'll try to think about an upgrade path today if nobody suggests one, but 👎 as is to me.

@stof
Copy link
Member

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 reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneAug 29, 2017
@chalasr
Copy link
Member

@thewilkybarkid Would you mind looking at@stof's suggestion? I can do it if you don't.

@chalasrchalasr modified the milestones:3.4,2.7Aug 29, 2017
@chalasr
Copy link
Member

This is for 3.4 as it is a behavior change and should include deprecations, branch needs to be rebased and PR retargeted.

@thewilkybarkid
Copy link
ContributorAuthor

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
Copy link
Member

If you want underscores if your cookie name why wouldn't you have used that already?

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
Copy link
ContributorAuthor

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
Copy link
Member

chalasr commentedSep 2, 2017
edited
Loading

@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.
This behavior exists for years and this changes it, but we don't want to bother our users for no strong reason (given you can avoid normalization by explicitly setting thename attribute instead of using the cookie name as key, right?).

@weaverryan
Copy link
Member

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
Copy link
Member

Moving to 4.1. Rebase on master might be needed, where PHP 7.1 features can be used btw.

@javiereguiluz
Copy link
Member

This is tricky ... but Symfony's policy in similar situations has always been:

  1. If this is considered a bug, then we can fix it, even if that changes the behavior and introduces a BC break...
  2. ..."BC breaks" are not considered for bug fixes, because otherwise, every single bug fix would be a "BC break" (you are changing the previous code behavior!)

So I'd say, this is a bug fix and not a BC break.

@chalasr
Copy link
Member

Still -1 for me without BC layer, not worth the breaking change as there is a valid way to avoid this behavior (by specifyingname: ... instead of using the name as key).
All keys are normalized by default (that could be reconsidered on master) and that's consistent with the decision made on the very same issue regarding other config nodes in the past.@thewilkybarkid should we close/take over?

@thewilkybarkid
Copy link
ContributorAuthor

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
Copy link
Member

Closing in favor of#30111, thank you for rising the issue.

fabpot added a commit that referenced this pull requestFeb 12, 2019
…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
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@ro0NLro0NLro0NL approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

9 participants

@thewilkybarkid@chalasr@stof@weaverryan@nicolas-grekas@javiereguiluz@ro0NL@lyrixx@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp