From 69031ab35e1e112bb6caaf86189f6054892a0f4f Mon Sep 17 00:00:00 2001 From: iglocska Date: Thu, 12 Nov 2015 09:46:33 +0100 Subject: [PATCH] Fixed an issue where PGP keys that are set to never expire show up as expired --- VERSION.json | 2 +- app/Model/User.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION.json b/VERSION.json index 27f741313..ef54516ac 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1 +1 @@ -{"major":2, "minor":3, "hotfix":156} +{"major":2, "minor":3, "hotfix":157} diff --git a/app/Model/User.php b/app/Model/User.php index e11447b38..05c6b886b 100755 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -393,7 +393,8 @@ class User extends AppModel { $sortedKeys = array('valid' => 0, 'expired' => 0, 'noEncrypt' => 0); foreach ($subKeys as $subKey) { $issue = false; - if ($currentTimestamp > $subKey->getExpirationDate()) { + $expiration = $subKey->getExpirationDate(); + if ($expiration != 0 && $currentTimestamp > $expiration) { $sortedKeys['expired']++; continue; }