Merge pull request #11297 from nextcloud/bugfix/noid/this-database-dude

Copy the expiration from 480864b3e3 to …
This commit is contained in:
Roeland Jago Douma 2018-09-25 09:04:44 +02:00 committed by GitHub
commit 92fa373314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,7 @@ class DefaultTokenProvider implements IProvider {
throw new InvalidTokenException(); throw new InvalidTokenException();
} }
if ($token->getExpires() !== null && $token->getExpires() < $this->time->getTime()) { if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
throw new ExpiredTokenException($token); throw new ExpiredTokenException($token);
} }

View File

@ -80,7 +80,7 @@ class PublicKeyTokenProvider implements IProvider {
throw new InvalidTokenException(); throw new InvalidTokenException();
} }
if ($token->getExpires() !== null && $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
throw new ExpiredTokenException($token); throw new ExpiredTokenException($token);
} }
@ -94,7 +94,7 @@ class PublicKeyTokenProvider implements IProvider {
throw new InvalidTokenException(); throw new InvalidTokenException();
} }
if ($token->getExpires() !== null && $token->getExpires() < $this->time->getTime()) { if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
throw new ExpiredTokenException($token); throw new ExpiredTokenException($token);
} }