-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Move the handleAuthenticationSuccess logic outside try/catch block #39389
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
shouldn't the |
77a92aa
to
8bfa689
Compare
We should investigate the impact on |
Indeed, the |
22f6bd9
to
c3236ad
Compare
refactor to hook the I kept |
9f41c3b
to
ce370d1
Compare
hey @wouterj would you mind to have a look? |
Hi! My idea back in 5.1 when introducing However, this PR shows that there is a need for an event that doesn't indicate success nor failure, but only indicates that the password was fully checked. Would it make sense to introduce a new |
Thank you for your input 🤗
If I understand well, we keep this PR as it (listen to AuthenticationSuccessEvent event), and we open a new PR in 5.3 to add a new event and plug AuthenticationSuccessEvent to this new event. When this PR will be merged UP, I'll take care of this 👍 .
The current behavior (LoginSuccess leads to a LoginFailure) is a bug (this is the root reason of this PR) and is not documented. |
Sorry, I thought about CHANGELOG/UPGRADE, not the online docs. I'm not sure though if we do CHANGELOG for patch releases that changed behavior. Otherwise, let's leave it as is, I don't think many are using the experimental stuff in 5.1.
👍 yes |
5.1 goes out of maintenance at the end of the month. |
@fabpot I'm not sure I understand what you're trying to say. Are you saying "don't bother about documenting the change" or are you suggesting not to fix this in 5.1? Thanks! |
I was suggesting to not patch 5.1 in any way. |
ce370d1
to
da5c39e
Compare
changed base to 5.2 |
The current implementation of
AuthenticationManager
handle thehandleAuthenticationSuccess
logic in a try/catch block which triggers thehandleAuthenticationFailure
in case of failure.Which could leads to inconsistency and unexpected behavior. The authentication is either successfully or failure, but can't be both in the same request.