From 8feb2653ce1e1f4f4bda821534f4b0aa8fececb7 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 26 Jan 2020 16:53:34 +0100 Subject: [PATCH] [#13] Fix: Secrets in MEM store were instantly expired Signed-off-by: Knut Ahlers --- storage_mem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage_mem.go b/storage_mem.go index 2fb311c..07c1c75 100644 --- a/storage_mem.go +++ b/storage_mem.go @@ -41,7 +41,7 @@ func (s storageMem) ReadAndDestroy(id string) (string, error) { defer delete(s.store, id) - if secret.Expiry.Before(time.Now()) { + if !secret.Expiry.IsZero() && secret.Expiry.Before(time.Now()) { return "", errSecretNotFound }