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

[Security] Prevent creating session in stateless firewalls#51320

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

Closed
Seb33300 wants to merge2 commits intosymfony:6.3fromSeb33300:6.3-stateless

Conversation

@Seb33300
Copy link
Contributor

@Seb33300Seb33300 commentedAug 9, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#51319
LicenseMIT
Doc PR

Please check related issue for details.

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "6.4" but it seems your PR description refers to branch "6.3".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

$this->logger?->debug('Authentication failure, redirect triggered.', ['failure_path' =>$options['failure_path']]);

$request->getSession()->set(SecurityRequestAttributes::AUTHENTICATION_ERROR,$exception);
if ($request->hasPreviousSession()) {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Better if we could check if!$options['stateless'] here, but that option is not passed

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

We cannot check on$request->hasPreviousSession() this is the reason why the test is failing...

Copy link
Member

Choose a reason for hiding this comment

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

hasPreviousSession is absolutely not the same than stateless.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

So we need a way to access thestateless option from the firewall.
If someone has an idea how to do this, please help on that. I will close that PR for now.

Copy link
Member

Choose a reason for hiding this comment

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

@Seb33300 You can check if the_stateless attribute is set totrue instead

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Good point! I modified my PR and reopened it.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Oups cannot reopen because I force pushed...
Here is the new PR:#51350

chalasr added a commit that referenced this pull requestAug 25, 2023
… (Seb33300)This PR was squashed before being merged into the 6.3 branch.Discussion----------[Security] Prevent creating session in stateless firewalls| Q             | A| ------------- | ---| Branch?       | 6.3| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fix#51319| License       | MIT| Doc PR        |<!--Replace this notice by a short README for your feature/bugfix.This will help reviewers and should be a good start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply   (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (seehttps://symfony.com/bc).-->Please check related issue for details.Same as#51320 with `@chalasr` suggestion:#51320 (comment)Commits-------4efd50e [Security] Prevent creating session in stateless firewalls
symfony-splitter pushed a commit to symfony/security-http that referenced this pull requestAug 25, 2023
… (Seb33300)This PR was squashed before being merged into the 6.3 branch.Discussion----------[Security] Prevent creating session in stateless firewalls| Q             | A| ------------- | ---| Branch?       | 6.3| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fixsymfony/symfony#51319| License       | MIT| Doc PR        |<!--Replace this notice by a short README for your feature/bugfix.This will help reviewers and should be a good start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply   (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (seehttps://symfony.com/bc).-->Please check related issue for details.Same assymfony/symfony#51320 with `@chalasr` suggestion:symfony/symfony#51320 (comment)Commits-------4efd50e34c [Security] Prevent creating session in stateless firewalls
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@wouterjwouterjAwaiting requested review from wouterj

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

Session created by default handlers on stateless firewalls

4 participants

@Seb33300@carsonbot@stof@chalasr

[8]ページ先頭

©2009-2025 Movatter.jp