diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-08 17:20:43 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-08 17:27:07 +0300 |
commit | a5a272e5d4f1dd11295ecef3c2c8c6724eee29df (patch) | |
tree | 41e4cd64e06f4ea60d6295b45cf141b444e1803e | |
parent | 877bae5fdb8025845f90287119607045dbb2ec72 (diff) |
Make the token expiration also work for autocasting 0
Some bad databases don't respect the default null apprently.
Now even if they cast it to 0 it should work just fine.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenProvider.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index eee4db20af9..dd7829cc68c 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -159,7 +159,7 @@ class DefaultTokenProvider implements IProvider { 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); } |