Skip to content

Commit

Permalink
Merge pull request #4904 from hashicorp/b-vault-panic
Browse files Browse the repository at this point in the history
vault: fix panic by checking for nil secret
  • Loading branch information
schmichael committed Nov 20, 2018
2 parents 1f98eed + f5f5948 commit e8475fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nomad/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ func (v *vaultClient) renew() error {
if err != nil {
return err
}
if secret == nil {
// It's possible for RenewSelf to return (nil, nil) if the
// response body from Vault is empty.
return fmt.Errorf("renewal failed: empty response from vault")
}

auth := secret.Auth
if auth == nil {
Expand Down

0 comments on commit e8475fe

Please sign in to comment.