Skip to content

Commit

Permalink
fix: add panic nil check for user (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Aug 22, 2024
1 parent 45dabdc commit c70003d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit c70003d

Please sign in to comment.