diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-21 14:34:29 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-21 14:34:29 +0200 |
commit | b3a92a4e39cec7a43e52bbdcdd10736112c714a5 (patch) | |
tree | 984f871ad8ee17983d7001f28f0952092481e3d2 /lib | |
parent | f544c9fec9e24f7216aafdada680378044ddaf61 (diff) | |
download | nextcloud-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.php | 2 |
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); } |