Tokens without password should not trigger changed password invalidation

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-10-07 19:30:05 +02:00 committed by backportbot[bot]
parent 6e7ec1dd7a
commit b2566e3dda

View file

@ -225,7 +225,7 @@ class DefaultTokenProvider implements IProvider {
*/
public function getPassword(IToken $savedToken, string $tokenId): string {
$password = $savedToken->getPassword();
if (is_null($password)) {
if ($password === null || $password === '') {
throw new PasswordlessTokenException();
}
return $this->decryptPassword($password, $tokenId);