Merge pull request #11103 from nextcloud/backport/token_expire_hardening

[stable14] Expire tokens hardening
This commit is contained in:
Roeland Jago Douma 2018-09-07 13:59:10 +02:00 committed by GitHub
commit 5b89eff367
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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);
}