]> source.dussan.org Git - nextcloud-server.git/commitdiff
Expire tokens hardening 11103/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 7 Sep 2018 08:01:31 +0000 (10:01 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 7 Sep 2018 08:02:56 +0000 (10:02 +0200)
Just to be sure that the field is also not 0

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

index f6a6fc3455f3dccf215e81a9c069756c1caf8236..73bd7a711dca2568cb53528d09d988279f427c75 100644 (file)
@@ -80,7 +80,7 @@ class PublicKeyTokenProvider implements IProvider {
                        throw new InvalidTokenException();
                }
 
-               if ($token->getExpires() !== null && $token->getExpires() < $this->time->getTime()) {
+               if ($token->getExpires() !== null && $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
                        throw new ExpiredTokenException($token);
                }