summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-10-21 14:34:29 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-10-21 14:34:29 +0200
commitb3a92a4e39cec7a43e52bbdcdd10736112c714a5 (patch)
tree984f871ad8ee17983d7001f28f0952092481e3d2 /lib
parentf544c9fec9e24f7216aafdada680378044ddaf61 (diff)
downloadnextcloud-server-b3a92a4e39cec7a43e52bbdcdd10736112c714a5.tar.gz
nextcloud-server-b3a92a4e39cec7a43e52bbdcdd10736112c714a5.zip
Expired PK tokens should not fall back to legacy tokens
Fixes #11919 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/Token/Manager.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Authentication/Token/Manager.php b/lib/private/Authentication/Token/Manager.php
index 7c991eadea9..a811393f553 100644
--- a/lib/private/Authentication/Token/Manager.php
+++ b/lib/private/Authentication/Token/Manager.php
@@ -138,6 +138,8 @@ class Manager implements IProvider {
public function getTokenById(int $tokenId): IToken {
try {
return $this->publicKeyTokenProvider->getTokenById($tokenId);
+ } catch (ExpiredTokenException $e) {
+ throw $e;
} catch (InvalidTokenException $e) {
return $this->defaultTokenProvider->getTokenById($tokenId);
}