mirror of
https://github.com/Luzifer/ots.git
synced 2025-01-26 14:15:55 -05:00
[#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
@ -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…
x
Reference in New Issue
Block a user