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

Fix panic when decoding 'Connect: null' #8537

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Aug 18, 2020

Fixes #8529

Surprisingly the json.Unmarshal updates the aux pointer to a nil, even though it was passed in non-nil.

Note that while this fixes the panic, that request would still fail with a 400 because ProxyDestination was removed in 65be587 and a704ebe made unknown fields fail validation.

If we backport this fix to 1.6.x, that request should work.

@dnephin dnephin added type/bug Feature does not function as expected theme/api Relating to the HTTP API interface backport/1.6 labels Aug 18, 2020
@dnephin dnephin requested a review from a team August 18, 2020 22:51
Copy link
Member

@hanshasselberg hanshasselberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Surprisingly the json Unmarshal updates the aux pointer to a nil.
@dnephin dnephin force-pushed the dnephin/fix-panic-on-connect-nil branch from d058c6f to 07ad662 Compare August 20, 2020 21:52
@dnephin dnephin merged commit 01745fe into master Aug 20, 2020
@dnephin dnephin deleted the dnephin/fix-panic-on-connect-nil branch August 20, 2020 22:00
@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit 01745fe onto release/1.8.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Aug 20, 2020
@hashicorp-ci
Copy link
Contributor

🍒❌ Cherry pick of commit 01745fe onto release/1.7.x failed! Build Log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api Relating to the HTTP API interface type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP /v1/catalog/register endpoint closes connection when decoding invalid Service.Connect field
3 participants