From defaea5a87c728c7ac49da323a59f5c5d77d1041 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 16 Sep 2021 09:30:15 -0600 Subject: [PATCH] referencing secretInput directly rather than looking up in State by key Signed-off-by: Richard Jones --- state/input.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state/input.go b/state/input.go index 3188f000..5c75fb08 100644 --- a/state/input.go +++ b/state/input.go @@ -197,10 +197,10 @@ func SecretInput(data string) Input { type secretInput string -func (i secretInput) Compile(key string, s *State) (*compiler.Value, error) { +func (i secretInput) Compile(key string, _ *State) (*compiler.Value, error) { hash := sha256.New() hash.Write([]byte(key)) - checksum := hash.Sum([]byte(s.Inputs[key].Secret.PlainText())) + checksum := hash.Sum([]byte(i.PlainText())) secretValue := fmt.Sprintf(`{id:"secret=%s;hash=%x"}`, key, checksum) return compiler.Compile("", secretValue) }