]> source.dussan.org Git - nextcloud-server.git/commitdiff
Expired PK tokens should not fall back to legacy tokens
authorRoeland Jago Douma <roeland@famdouma.nl>
Sun, 21 Oct 2018 12:34:29 +0000 (14:34 +0200)
committerJan Dageförde <jan.dagefoerde@ercis.uni-muenster.de>
Thu, 25 Oct 2018 08:59:07 +0000 (10:59 +0200)
Fixes #11919

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Authentication/Token/Manager.php

index 254a1598943d287e3bce9fcbb269969e55f8684c..3cf48e868b6d045579b610e2f60bb65985aa111a 100644 (file)
@@ -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);
                }