summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-06-08 16:20:43 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-08 16:26:30 +0200
commit88c7c6abe35310136024910af4877384df1c1c2d (patch)
tree1f57599e99e511cb18157872ef355bd505bfae62 /lib
parentc55e842478198a453c6c4b01c5a0ad150494b25e (diff)
downloadnextcloud-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.php2
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);
}