-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Fixed being logged out on failed attempt in guard #26014
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
[Security] Fixed being logged out on failed attempt in guard #26014
Conversation
ping @weaverryan |
I agree with @xabbuh #25992 (comment) that the current behavior is not the correct behavior. I even checked Amazon further: I can (A) login, (B) go back to the login page and enter an incorrect password and (C) go back to my account area and even update my password. So, let's fix this :). So now the question: is this change a BC break? Because this deals with security... and specifically it's something that relaxes security, I think it is a BC break. That sucks, but... I think it's correct. The fix, then, means adding a BC layer. I can only think of one way: adding a new option to opt into this behavior. I was thinking an option under If not set (or set to anything except false), we would keep the current behavior but trigger a deprecation warning. If the parameter is set to false, we could call a new internal This change would also need to be made to:
Really, the change is not that huge, so I think we should do it. @iltar are you up for it? I'm in support of this. |
As it's currently an issue, I'm not sure if I can wait till the release of 4.1, but I can always fix it for 4.1 and "backport" it via file autoloading in composer for my local project. |
In theory, you could fix on 2.7 if you’d like :). It shouldn’t make a huge difference, except that I’m not sure how our deprecation policy works. As I understand it, you would not include the deprecation warnings for the parameter NOT being set in 2.7. Those would be added in 4.1 (but I’m not 100% sure here - I don’t know if a time it’s come up) |
My opinion on the matter:
|
If we fix it as a bug in guard (because the Simple* variant didn't show this behavior for me), it should be on 2.8 as this is where guard was introduced. |
so, is this ready? |
In theory this can be merged, there just needs to be a consensus on whether it should be merged 😅 |
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.
Reading the issue and the all comments, I think this makes perfectly sense.
It doesn't reduce any security (you still can't access resources you aren't allowed to access), so I would just merge it as a bug fix.
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.
+1 Let's merge it as a bug fix then
Thank you @iltar. |
…rd (iltar) This PR was merged into the 2.8 branch. Discussion ---------- [Security] Fixed being logged out on failed attempt in guard | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25992 | License | MIT | Doc PR | ~ This fixes the issue described in the ticket. After this fix, guard will no longer "forget" your authentication when your next attempt fails. Commits ------- 4fc0ecb Fixed being logged out on failed attempt in guard
This fixes the issue described in the ticket. After this fix, guard will no longer "forget" your authentication when your next attempt fails.