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

Node v6 - TypeError thrown when validating parsed querystring objects #51

Closed
alexcorre opened this issue Nov 28, 2016 · 3 comments
Closed

Comments

@alexcorre
Copy link
Contributor

Core node module querystring was updated in Node v6 to return plain objects that do not prototypically extend from the JavaScript Object.

According to the Node docs:

This means that the typical Object methods such as obj.toString(), obj.hasOwnProperty(), and others are not defined and will not work.

See Node.js PR here:
nodejs/node#6055

breaking changes list for v5-v6:
https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6#querystring

As a result of this change, this packages validation of parsed query strings throws an error on this line when the var object is a parsed query string:

https://github.com/mac-/ratify/blob/master/lib/RouteSchemaManager.js#L117

@alexcorre alexcorre changed the title Accusamus earum voluptatem Deserunt velit repellendus Velit veritatis voluptate sit architecto quia qui et veritatis nostrud Node v6 - TypeError thrown when validating parsed querystring objects Nov 28, 2016
@mac-
Copy link
Owner

mac- commented Nov 30, 2016

Thanks for the fix! I'll try to get this merged/published tonight.

@mac- mac- closed this as completed in #52 Dec 1, 2016
@alexcorre
Copy link
Contributor Author

Thanks @mac- for merging. I see you released 3.0.0 to npm, but neglected to push the version bump and tag to github. Hard to verify that the release contains my fix without installing.

Are you planning to update github with the release version bump + tag?

Thanks!

@mac-
Copy link
Owner

mac- commented Dec 7, 2016

yeah sorry... I'll get those pushed as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants