summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2018-06-11 09:16:57 +0200
committerGitHub <noreply@github.com>2018-06-11 09:16:57 +0200
commitbf7620d86825bfd00ddec1ce8d1abaef73462721 (patch)
tree93590250314ff89322d38300e9c9c5da32e8f0ae
parentebdd9a0408fae55d6b9949433176d988a6868ef1 (diff)
parent88c7c6abe35310136024910af4877384df1c1c2d (diff)
downloadnextcloud-server-bf7620d86825bfd00ddec1ce8d1abaef73462721.tar.gz
nextcloud-server-bf7620d86825bfd00ddec1ce8d1abaef73462721.zip
Merge pull request #9803 from nextcloud/backport/9802/stable13
[stable13] Make the token expiration also work for autocasting 0
-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);
}