summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2018-06-11 09:17:29 +0200
committerGitHub <noreply@github.com>2018-06-11 09:17:29 +0200
commit07f5a2d44828cb5bfd3620d9a9159110a1c74e98 (patch)
tree3aefd51a9b9dd34689dbdb0eef5df0cc078c5c94
parent2dc7696dda3541e416ce64433690679548511416 (diff)
parenta5a272e5d4f1dd11295ecef3c2c8c6724eee29df (diff)
downloadnextcloud-server-07f5a2d44828cb5bfd3620d9a9159110a1c74e98.tar.gz
nextcloud-server-07f5a2d44828cb5bfd3620d9a9159110a1c74e98.zip
Merge pull request #9804 from nextcloud/backport/9802/stable12
[stable12] 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 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);
}