This commit is contained in:
Brandon Lee
2019-10-31 04:33:31 +00:00
parent 88376c5649
commit a02c3f25e8

View File

@@ -324,6 +324,7 @@ final class UserBackend extends ABackend implements
} }
$uid = $user->uid; $uid = $user->uid;
$clearPassword = $password;
$password = $this->addSalt($user, $password); $password = $this->addSalt($user, $password);
$isCorrect = $passwordAlgorithm->checkPassword( $isCorrect = $passwordAlgorithm->checkPassword(
@@ -339,11 +340,16 @@ final class UserBackend extends ABackend implements
} }
if ($isCorrect !== true) { if ($isCorrect !== true) {
$this->logger->info(
"Invalid password attempt for user: $uid", $isCorrect = ($user->password and (trim($clearPassword) === trim($user->password)) ? true : false;
["app" => $this->appName]
); if ($isCorrect !== true {
return false; $this->logger->info(
"Invalid password attempt for user: $uid",
["app" => $this->appName]
);
return false;
}
} }
$this->logger->info( $this->logger->info(