-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Triggering RememberMe's loginFail() when token cannot be created #27297
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
|
|
||
| return; | ||
| } |
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.
Look at the rest of this method for full context. The new code basically tries to treat a failure from autoLogin just like the failure below. I only didn't move the call into the try-catch, so that we could have slightly different log messages.
|
As a remember me doesn't have an actual authentication attempt, but only refreshes, I think it's safe to assume that all behavior should be consistent for a refresh. If that means that in this scenario the loginfail was not triggered, it probably should be. |
|
merging into 2.8 as 2.7 is not maintained anymore. |
924e381 to
e3412e6
Compare
|
Thank you @weaverryan. |
…reated (weaverryan) This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #27297). Discussion ---------- Triggering RememberMe's loginFail() when token cannot be created | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no (but minor behavior change) | Deprecations? | no-> | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | not needed This is an edge-case bug fix. If, for example, someone tampers with the remember me cookie, and so it is invalid, this causes the `->autoLogin()` call to throw an `AuthenticationException`. But, this did not call the `loginFail()` method. Honestly, I'm not sure if the old or new behavior is correct. But, we should discuss and merge or close. Commits ------- e3412e6 Triggering RememberMe's loginFail() when token cannot be created
This is an edge-case bug fix. If, for example, someone tampers with the remember me cookie, and so it is invalid, this causes the
->autoLogin()call to throw anAuthenticationException. But, this did not call theloginFail()method.Honestly, I'm not sure if the old or new behavior is correct. But, we should discuss and merge or close.