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] Fixed persistence of AuthenticationException#15557

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
rpg600 wants to merge1 commit intosymfony:2.3fromrpg600:fix-auth-error

Conversation

@rpg600
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

During the refresh of an authenticated user the potential AuthenticationException is ignored, now it is persisted in session just like after an authentication failure.

Copy link
Member

Choose a reason for hiding this comment

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

setting things in the session must not be done like this all the time:

  • the request may not have a Session in it, which triggers a fatal error in your code
  • if the firewall is configured as stateless, nothing should be set in the session even if there is a session

@rpg600rpg600 changed the titleFixed persistence of AuthenticationException[Security] Fixed persistence of AuthenticationExceptionAug 14, 2015
@linaori
Copy link
Contributor

@rpg600 This would only fix the case where the refresh cannot find the user anymore when aUsernameNotFoundException is thrown. Then you add the username which was not found in the session so it shows up in the login form.

I don't think this is what you intended to change. This will also alter the flow in the location where this method is called. Can you add tests to verify this is all working the way you want it to?

@rpg600
Copy link
ContributorAuthor

@iltar This is exactly my use case, i faced this problem when i configured two providers having the same user class (but this is another issue) and i didn't know where it come from. It can be also useful for auth exceptions thrown by the user land.

@rpg600rpg600force-pushed thefix-auth-error branch 3 times, most recently fromcc21c6c tod6aebb1CompareAugust 31, 2015 13:25
@fabpot
Copy link
Member

What about#12465 instead?

@fabpot
Copy link
Member

probably fixed by#21865

@fabpotfabpot closed thisMar 22, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

7 participants

@rpg600@linaori@fabpot@stof@javiereguiluz@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp