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:
authorJulius Härtl <jus@bitgrid.net>2021-10-07 20:30:05 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-10-11 12:33:18 +0300
commitb2566e3ddab10f1d4b2c50542774179b7c8b2c0b (patch)
tree22be38b7f7e35736d85fad397fb2d89358831683 /lib
parent6e7ec1dd7a4c148a8dada8868383a68ea6fde026 (diff)
Tokens without password should not trigger changed password invalidation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
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 a6a1af5a97a..f9bed233ba8 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);