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:20:43 +0200
commit480864b3e32d88361b17b70d238f986f64579757 (patch)
tree741316670d160b8b5d463aa659d50fb8f3c36eec /lib
parent8d26f9cd6d2304cd650e900a280f09a5f43396ef (diff)
downloadnextcloud-server-480864b3e32d88361b17b70d238f986f64579757.tar.gz
nextcloud-server-480864b3e32d88361b17b70d238f986f64579757.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 5df74cadac4..7a43dbb23e1 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -171,7 +171,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);
}