Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Show user account specific errors#56830
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
f32956f
to32d8da7
CompareLooks like fabbot.io is showing a falsepositive code style issue. When applying the (unrelated) changes, the tests are failing |
Hi Christian, The fact that whether built-in So if we want to change this, that would definitely be a new feature. |
antfarmer commentedMay 21, 2024
I'm not clear; is this fix now to revert the changes to only mask UserNotFoundException's? Personally, I'm fine with that because I do not see much benefit to masking locked accounts. The account would be locked and there would normally be nothing a legitimate or malicious user could do to unlock the account. Only to accommodate others on this, it may be worth considering having two settings, eg. hideUserNotFoundExceptions and hideAllAuthExceptions. In my project I see there are at least 3 places where this logic is implemented:
Will these also be updated or are these others being phased out? Also, I assume this will be patched in 5.4+ going forward. |
How can we move on with this PR? |
32d8da7
to26852b9
Compare44b6ad7
to181ff20
Compare181ff20
to33663d3
CompareI updated the PR, so it should be BC now. |
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.
This should target 7.2 as this is a new feature.
@chalasr can you please have another look?
I don't like adding new options so if there's a way without, suggestions welcome :)
@@ -131,4 +134,17 @@ abstract protected function retrieveUser(string $username, UsernamePasswordToken | |||
* @throws AuthenticationException if the credentials could not be validated | |||
*/ | |||
abstract protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token); | |||
private function isFilteredException(Exception $exception): bool |
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.
can't we be more specific about the type-hint? (same below)
Closing in favor of#58300 |
Uh oh!
There was an error while loading.Please reload this page.
According to the
hideUserNotFoundExceptions
flag, onlyUserNotFoundException
should be hidden, but the implementation was also silencing account specific errors.To fix the issue in a BC way, a new
show_account_status_exceptions
config key was introduced to show account exceptions.