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

Unexpected "format" query param could cause problems when returning error messages #223

Closed
GUI opened this issue Apr 30, 2015 · 1 comment

Comments

@GUI
Copy link
Member

GUI commented Apr 30, 2015

In the event that api.data.gov needs to return an error directly to the client (over rate limit, invalid api key, etc), there was a bug in our code that could cause a crash if the request was also accompanied by a format query parameter. The format query parameter would have to be given in such a way that the Node.js URL parser would parse it as an object, rather than a string. Since the user had to pass in this specific type of query parameter, and api.data.gov would have be returning an error to the client (rather than proxying to the underlying API), it was rare for anyone to have run into this, but since it causes a crash (which is recovered from), it's still definitely something we needed to fix.

@GUI
Copy link
Member Author

GUI commented Apr 30, 2015

Fixed by CM in NREL/api-umbrella-gatekeeper#12. This has now been deployed to production, so thanks @cmc333333!

@GUI GUI closed this as completed Apr 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants