summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-09-07 10:01:31 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-09-07 10:01:31 +0200
commit47b46fa69db7d569f871e6325c2874d13f336a81 (patch)
treeb7001bf9b8a7348208176a86981cd00df12a56df
parentbf630e46f62c8ab6ec37f5d169cb2b75711028df (diff)
downloadnextcloud-server-47b46fa69db7d569f871e6325c2874d13f336a81.tar.gz
nextcloud-server-47b46fa69db7d569f871e6325c2874d13f336a81.zip
Expire tokens hardening
Just to be sure that the field is also not 0 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
index f6a6fc3455f..73bd7a711dc 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() < $this->time->getTime()) {
+ if ($token->getExpires() !== null && $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
throw new ExpiredTokenException($token);
}