mirror of
https://github.com/Luzifer/ots.git
synced 2025-01-11 06:59:33 -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)
|
||||
|
||||
if secret.Expiry.Before(time.Now()) {
|
||||
if !secret.Expiry.IsZero() && secret.Expiry.Before(time.Now()) {
|
||||
return "", errSecretNotFound
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user