diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-09-25 09:04:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 09:04:44 +0200 |
commit | 92fa373314e77dc905036812253f6b776a9e1aaf (patch) | |
tree | b843aaa3ad5f76f1a6d7722225c4a98980520725 /lib/private | |
parent | d616782773f75cda7cad81cda93c9c904a4db6cb (diff) | |
parent | f258e65f1315ae0eaf15495cf9a1a809bd3847e3 (diff) | |
download | nextcloud-server-92fa373314e77dc905036812253f6b776a9e1aaf.tar.gz nextcloud-server-92fa373314e77dc905036812253f6b776a9e1aaf.zip |
Merge pull request #11297 from nextcloud/bugfix/noid/this-database-dude
Copy the expiration from 480864b3e32d88361b17b70d238f986f64579757 to …
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenProvider.php | 2 | ||||
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenProvider.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index 8c2d8c33a97..ad45303fa7c 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -184,7 +184,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); } diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index 73bd7a711dc..fe352d29e05 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -80,7 +80,7 @@ class PublicKeyTokenProvider implements IProvider { throw new InvalidTokenException(); } - if ($token->getExpires() !== null && $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { + if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { throw new ExpiredTokenException($token); } @@ -94,7 +94,7 @@ class PublicKeyTokenProvider 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); } |