Skip to content

[Security] limited the password length passed to encoders #9100

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

Merged
merged 1 commit into from
Sep 23, 2013

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 23, 2013

No description provided.

fabpot added a commit that referenced this pull request Sep 23, 2013
This PR was merged into the master branch.

Discussion
----------

[Security] limited the password length passed to encoders

Commits
-------

f7d0ec6 [Security] limited the password length passed to encoders
@fabpot fabpot merged commit f7d0ec6 into symfony:master Sep 23, 2013
@@ -78,6 +80,8 @@ public function encodePassword($raw, $salt)
*/
public function isPasswordValid($encoded, $raw, $salt)
{
$this->checkPasswordLength($raw);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of throwing a BadCredentialsException here (which means it has to be catched in the CurrentPasswordValidator to avoid getting a 500 error when applying the validator, which is not done currently), wouldn't it be better to return false in isPasswordValid ? This method has 2 different way to handle invalid passwords now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants