diff options
author | Azul <azul@riseup.net> | 2017-11-03 14:33:51 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2017-11-03 14:33:51 +0100 |
commit | ec996134a1f23ee36aff9d3ad2c800af71623207 (patch) | |
tree | 5b722078b32061dd662f1ae1db625812ab0d9c8e /lib | |
parent | 61ebd2908da912ee269dbeb71b5bddc2b50efbb2 (diff) |
fix: no expiration date means not outdated
We were using Time.at(expirationdate) even if it was nil which
led to using the Time.at(0). Instead an unset expirationdate
is meant to not expire the key at all.
Our tests did not catch this because the assertions were in
blocks that did not get run at all. (at least in the HKP
integration test).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nickserver/hkp/key_info.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nickserver/hkp/key_info.rb b/lib/nickserver/hkp/key_info.rb index e1a9500..c1b1ad3 100644 --- a/lib/nickserver/hkp/key_info.rb +++ b/lib/nickserver/hkp/key_info.rb @@ -49,7 +49,7 @@ module Nickserver::Hkp def expirationdate expires = properties[4] - Time.at(expires.to_i) + expires && Time.at(expires.to_i) end def flags |