Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault: fix panic by checking for nil secret #4904

Merged
merged 1 commit into from
Nov 20, 2018
Merged

Commits on Nov 20, 2018

  1. vault: fix panic by checking for nil secret

    Vault's RenewSelf(...) API may return (nil, nil). We failed to check if
    secret was nil before attempting to use it.
    
    RenewSelf:
    https://github.com/hashicorp/vault/blob/e3eee5b4fb386418d10b6a248252ec6e2e05d980/api/auth_token.go#L138-L155
    
    Calls ParseSecret:
    https://github.com/hashicorp/vault/blob/e3eee5b4fb386418d10b6a248252ec6e2e05d980/api/secret.go#L309-L311
    
    If anyone has an idea on how to test this I didn't see any options. We
    use a real Vault service, so there's no opportunity to mock the
    response.
    schmichael committed Nov 20, 2018
    Configuration menu
    Copy the full SHA
    f5f5948 View commit details
    Browse the repository at this point in the history