Browse Source

fix: Always set last activity if we update the row of an authtoken anyways

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Julius Härtl 1 month ago
parent
commit
04780ae30a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/private/Authentication/Token/PublicKeyTokenProvider.php

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

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