diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-08 16:20:43 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-08 16:26:30 +0200 |
commit | 88c7c6abe35310136024910af4877384df1c1c2d (patch) | |
tree | 1f57599e99e511cb18157872ef355bd505bfae62 /lib | |
parent | c55e842478198a453c6c4b01c5a0ad150494b25e (diff) | |
download | nextcloud-server-88c7c6abe35310136024910af4877384df1c1c2d.tar.gz nextcloud-server-88c7c6abe35310136024910af4877384df1c1c2d.zip |
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>
Diffstat (limited to 'lib')
-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 4e87424e55c..35540f38e91 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -164,7 +164,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); } |