-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
plugins/gRPC: fix issues with reserved keywords in response data #3881
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to hit approve, LGTM
@@ -200,8 +201,14 @@ func respondRaw(w http.ResponseWriter, r *http.Request, resp *logical.Response) | |||
retErr(w, "no status code given") | |||
return | |||
} | |||
status, ok := statusRaw.(int) | |||
if !ok { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For safety, you should add a json.Number
check in here too, in case something has already serialized the data for some reason. It would be handled transparently by the JSON encoder for the response but would trip this here.
One comment, other than that LGTM! |
LGTM means Lists Good to Me? Because, list works for my plugin now! Thanks! |
fixes #3873