File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
lib/private/Authentication/Token Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,17 @@ public function getToken(string $tokenId): IToken {
9797 $ tokenHash = $ this ->hashToken ($ tokenId );
9898
9999 if (isset ($ this ->cache [$ tokenHash ])) {
100+ if ($ this ->cache [$ tokenHash ] instanceof DoesNotExistException) {
101+ $ ex = $ this ->cache [$ tokenHash ];
102+ throw new InvalidTokenException ("Token does not exist: " . $ ex ->getMessage (), 0 , $ ex );
103+ }
100104 $ token = $ this ->cache [$ tokenHash ];
101105 } else {
102106 try {
103107 $ token = $ this ->mapper ->getToken ($ this ->hashToken ($ tokenId ));
104108 $ this ->cache [$ token ->getToken ()] = $ token ;
105109 } catch (DoesNotExistException $ ex ) {
110+ $ this ->cache [$ tokenHash ] = $ ex ;
106111 throw new InvalidTokenException ("Token does not exist: " . $ ex ->getMessage (), 0 , $ ex );
107112 }
108113 }
You can’t perform that action at this time.
0 commit comments