From c70003d79951afbc5673dc12170353b4605ccd5f Mon Sep 17 00:00:00 2001 From: dave vader <48764154+plyr4@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:59:35 -0500 Subject: [PATCH] fix: add panic nil check for user (#462) --- vault/vault.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vault/vault.go b/vault/vault.go index b64be8f..3d328c9 100644 --- a/vault/vault.go +++ b/vault/vault.go @@ -84,7 +84,7 @@ func New(s *Setup) (*Client, error) { } // vault will return a nil Auth struct with no error if path is correct but password fails - if user.Auth == nil { + if user == nil || user.Auth == nil { return nil, fmt.Errorf("unable to set user token: authentication failed") }