Browse Source

Merge pull request #45026 from nextcloud/fix/token-update

Avoid updating the same oc_authtoken row twice
pull/45355/head
Christoph Wurst 1 month ago
parent
commit
fe7217d2d3
No account linked to committer's email address

+ 1
- 1
config/config.sample.php View File

@@ -376,7 +376,7 @@ $CONFIG = [
* Tokens are still checked every 5 minutes for validity
* max value: 300
*
* Defaults to ``300``
* Defaults to ``60``
*/
'token_auth_activity_update' => 60,


+ 2
- 0
lib/private/Authentication/Token/PublicKeyTokenProvider.php View File

@@ -308,6 +308,8 @@ class PublicKeyTokenProvider implements IProvider {
if (!($token instanceof PublicKeyToken)) {
throw new InvalidTokenException("Invalid token type");
}
$now = $this->time->getTime();
$token->setLastActivity($now);
$this->mapper->update($token);
$this->cacheToken($token);
}

Loading…
Cancel
Save