8000 minor #10213 [Security] Fix wrong usage in custom authenticator check… · symfony/symfony-docs@224afc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 224afc0

Browse files
committed
minor #10213 [Security] Fix wrong usage in custom authenticator checking if password is invalid (norkunas)
This PR was merged into the 2.8 branch. Discussion ---------- [Security] Fix wrong usage in custom authenticator checking if password is invalid ```Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface::isPasswordValid``` expects an UserInterface and a password, but example arguments was provided like for `Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface` <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 94f2951 Fix wrong usage in custom authenticator checking if password is invalid
2 parents ca68963 + 94f2951 commit 224afc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/custom_password_authenticator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ the user::
6969
if ('' === ($givenPassword = $token->getCredentials())) {
7070
throw new BadCredentialsException('The given password cannot be empty.');
7171
}
72-
if (!$this->encoder->isPasswordValid($user->getPassword(), $givenPassword, $user->getSalt())) {
72+
if (!$this->encoder->isPasswordValid($user, $givenPassword)) {
7373
throw new BadCredentialsException('The given password is invalid.');
7474
}
7575
}

0 commit comments

Comments
 (0)
0