-
-
Notifications
You must be signed in to change notification settings - Fork 9.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f32956f
to
32d8da7
Compare
Looks like fabbot.io is showing a false positive 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. |
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
to
26852b9
Compare
44b6ad7
to
181ff20
Compare
181ff20
to
33663d3
Compare
I 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 |
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.