Skip to content

Commit

Permalink
[Security] tweaked some exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 12, 2011
1 parent 41a1a75 commit e6fd8de
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -59,11 +59,11 @@ protected function checkAuthentication(UserInterface $user, UsernamePasswordToke
}
} else {
if (!$presentedPassword = $token->getCredentials()) {
throw new BadCredentialsException('Bad credentials');
throw new BadCredentialsException('The presented password cannot be empty.');
}

if (!$this->encoderFactory->getEncoder($user)->isPasswordValid($user->getPassword(), $presentedPassword, $user->getSalt())) {
throw new BadCredentialsException('Bad credentials');
throw new BadCredentialsException('The presented password is invalid.');
}
}
}
Expand Down

1 comment on commit e6fd8de

@lsmith77
Copy link
Contributor

Choose a reason for hiding this comment

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

In this context I would like to mention: http://trac.symfony-project.org/ticket/9523
And yes I still havent had time (or just motivation) to work on this myself :(

Please sign in to comment.