Merge pull request #29166 from nextcloud/backport/29122/stable20

[stable20] Tokens without password should not trigger changed password invalidation
pull/29181/head
MichaIng 3 years ago committed by GitHub
commit b91dc51f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save