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:
authorMorris Jobke <hey@morrisjobke.de>2021-01-22 18:14:45 +0300
committerGitHub <noreply@github.com>2021-01-22 18:14:45 +0300
commit47b10c3775cf3d431ec8375285c1c607e209bc96 (patch)
tree45330d983a0663a361df659f5120b7433d5bce10 /lib
parent257e7c4b5160b7e6ff0004335975dc278c5212e9 (diff)
parent99d525eb36d8e3e14dbf72f5fb66b8554dce357c (diff)
Merge pull request #25275 from nextcloud/fix/two-factor-token-type
Convert 2FA token type to string
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index 0a60606ad65..d95cc8b1ebf 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -339,7 +339,7 @@ class Manager {
$tokenId = $token->getId();
$tokensNeeding2FA = $this->config->getUserKeys($user->getUID(), 'login_token_2fa');
- if (!\in_array($tokenId, $tokensNeeding2FA, true)) {
+ if (!\in_array((string) $tokenId, $tokensNeeding2FA, true)) {
$this->session->set(self::SESSION_UID_DONE, $user->getUID());
return false;
}
@@ -376,14 +376,14 @@ class Manager {
$id = $this->session->getId();
$token = $this->tokenProvider->getToken($id);
- $this->config->setUserValue($user->getUID(), 'login_token_2fa', $token->getId(), $this->timeFactory->getTime());
+ $this->config->setUserValue($user->getUID(), 'login_token_2fa', (string) $token->getId(), $this->timeFactory->getTime());
}
public function clearTwoFactorPending(string $userId) {
$tokensNeeding2FA = $this->config->getUserKeys($userId, 'login_token_2fa');
foreach ($tokensNeeding2FA as $tokenId) {
- $this->tokenProvider->invalidateTokenById($userId, $tokenId);
+ $this->tokenProvider->invalidateTokenById($userId, (int)$tokenId);
}
}
}