Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2021-10-11 18:13:05 +0300
committerGitHub <noreply@github.com>2021-10-11 18:13:05 +0300
commitb91dc51f6cda85d0f070dca9b7dca963069f904f (patch)
treec5daf07bf0653456eb0639ef447aa12a29d71ef6 /lib
parenta6069d75c624b520beeffbfa5dbbaa1b4d3923bc (diff)
parent2377fdd8a962775792133d84e07f71efe2c06b8c (diff)
Merge pull request #29166 from nextcloud/backport/29122/stable20
[stable20] Tokens without password should not trigger changed password invalidation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/Token/DefaultTokenProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php
index ee8a28d3cb0..5e5cf73af95 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -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);