Skip to content

Commit

Permalink
[#13] Fix: Secrets in MEM store were instantly expired
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <[email protected]>
  • Loading branch information
Luzifer committed Jan 26, 2020
1 parent 9b9b9f4 commit 8feb265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage_mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8feb265

Please sign in to comment.