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] Set request stateless only if the attribute is not defined#49997

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

@tucksaun
Copy link
Contributor

@tucksauntucksaun commentedApr 11, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes-ish
New feature?no
Deprecations?no
Tickets#48044 (comment)
LicenseMIT
Doc PRn/a

The current implementation makes sense for most cases but not for every case as one can have a stateless authentication but still requires sessions.
This PR allows setting the request as non-stateless while having a stateless firewall but keeping the new behavior by default.

@nicolas-grekas
Copy link
Member

Thank you@tucksaun.

@nicolas-grekasnicolas-grekas merged commit2d77238 intosymfony:6.3Apr 12, 2023
@tucksauntucksaun deleted the security/statefull-route-stateless-firewall branchApril 12, 2023 11:15
@alamirault
Copy link
Contributor

Thanks@tucksaun, I missed this case !

tucksaun reacted with heart emoji

OskarStark added a commit to symfony/symfony-docs that referenced this pull requestApr 13, 2023
…ed (alamirault)This PR was squashed before being merged into the 6.3 branch.Discussion----------Set request stateless only if the attribute is not definedsymfony/symfony#48044 added in 6.3 was updated insymfony/symfony#49997.This PR ajust behavior documentationCommits-------20ee4d7 Set request stateless only if the attribute is not defined
nicolas-grekas added a commit that referenced this pull requestAug 16, 2024
…he request when firewall is stateless and the attribute is not already set (MatTheCat)This PR was submitted for the 7.2 branch but it was merged into the 6.4 branch instead.Discussion----------[SecurityBundle] Revert adding `_stateless` attribute to the request when firewall is stateless and the attribute is not already set| Q             | A| ------------- | ---| Branch?       | 6.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        |Fix#50715| License       | MIT#40372 was about routes matching both stateful and stateless firewalls: you couldn’t easily configure them as stateless under a stateless firewall only.#48044 fixed it by linking these two attributes: a stateless firewall then implied a stateless request. While it can sound logical, this impacted many projects using the session while authenticating users in a stateless fashion.At last,#49997 allowed to override this behavior by explicitly configuring routes as *not* stateless. This kind of proved that#48044 was a mistake: you cannot tell a request must be stateless only because it matches a stateless firewall.As such, this PR reverts#48044 (and consequently#49997) so that configuring routes as stateless is the developers responsibility alone. It also reopens#40372, but I think this issue should be fixed in an opt-in way (with a new `firewall.stateless.with_routes` boolean configuration in the SecurityBundle e.g.).Commits-------47baed9 [SecurityBundle] Revert adding `_stateless` attribute to the request when firewall is stateless and the attribute is not already set
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@wouterjwouterjAwaiting requested review from wouterj

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

4 participants

@tucksaun@nicolas-grekas@alamirault@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp