Expire tokens hardening

Just to be sure that the field is also not 0

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-09-07 10:01:31 +02:00
parent 1b35dc1cba
commit c83ac2472d
No known key found for this signature in database
GPG key ID: F941078878347C0C

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