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

Address a nil panic when writing an empty POST request to the ocsp handler #18184

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

stevendpclark
Copy link
Contributor

@stevendpclark stevendpclark commented Dec 1, 2022

Identified by @cipherboy thanks!

  • Seems when no body is sent with a POST request Vault will not populate the HTTPRequest member variable which causes a nil panic, it can be reproduced with vault write -force pki/ocsp
  • Add a check for it and the Body member variable to be nil before use.

VAULT-11842

…ndler

 - Seems when no JSON body is sent with a POST request Vault will not
   populate the HTTPRequest member variable which caused the nil panic
   - vault write -force pki/ocsp
 - Add a check for it and the Body member variable to be nil before use.
@stevendpclark stevendpclark added bug Used to indicate a potential bug secret/pki backport/1.12.x labels Dec 1, 2022
@stevendpclark stevendpclark added this to the 1.13.0-rc1 milestone Dec 1, 2022
@stevendpclark stevendpclark requested a review from a team December 1, 2022 14:44
@stevendpclark stevendpclark enabled auto-merge (squash) December 1, 2022 15:04
@stevendpclark stevendpclark merged commit b268889 into main Dec 1, 2022
@stevendpclark stevendpclark deleted the stevendpclark/fix-ocsp-panic-on-nil-request branch December 1, 2022 15:11
AnPucel pushed a commit that referenced this pull request Jan 14, 2023
…ndler (#18184)

* Address a nil panic when writing an empty POST request to the ocsp handler

 - Seems when no JSON body is sent with a POST request Vault will not
   populate the HTTPRequest member variable which caused the nil panic
   - vault write -force pki/ocsp
 - Add a check for it and the Body member variable to be nil before use.

* Add cl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug secret/pki
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants