[#13] Fix: Secrets in MEM store were instantly expired
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9b9b9f4567
commit
8feb2653ce
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ func (s storageMem) ReadAndDestroy(id string) (string, error) {
|
||||||
|
|
||||||
defer delete(s.store, id)
|
defer delete(s.store, id)
|
||||||
|
|
||||||
if secret.Expiry.Before(time.Now()) {
|
if !secret.Expiry.IsZero() && secret.Expiry.Before(time.Now()) {
|
||||||
return "", errSecretNotFound
|
return "", errSecretNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue