mscdex · GitHub

@mscdex added the querystring

Issues and PRs related to the built-in querystring module.

label

Apr 5, 2016

@mscdex

@jasnell jasnell added the semver-major

PRs that contain breaking changes and should be released in the next major version.

label

Apr 5, 2016

Closed

3 tasks

@mscdex mscdex removed the performance

Issues and PRs related to the performance of Node.js.

label

Apr 7, 2016

Closed

3 tasks

@mscdex

@mscdex

mscdex deleted the querystring-parse-empty-prototype branch

April 19, 2016 01:44

Closed

joelostrowski pushed a commit to joelostrowski/node that referenced this pull request

Apr 25, 2016
This commit safely allows querystring keys that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__. Additionally, this commit provides a bit of a speed
improvement (~25% in the querystring-parse 'manypairs' benchmark)
when there are many unique keys.
Fixes: nodejs#5642
PR-URL: nodejs#6055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

jasnell pushed a commit that referenced this pull request

Apr 26, 2016
This commit safely allows querystring keys that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__. Additionally, this commit provides a bit of a speed
improvement (~25% in the querystring-parse 'manypairs' benchmark)
when there are many unique keys.
Fixes: #5642
PR-URL: #6055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

Closed

@iyuq iyuq mentioned this pull request

Apr 29, 2016

Merged

vHanda added a commit to Open365/restutils that referenced this pull request

May 25, 2016

Closed

Closed

teohhanhui added a commit to teohhanhui/koa-prerender that referenced this pull request

Jun 17, 2016
Don't use Object.prototpye.hasOwnProperty on object returned by querystring.parse
Since it does not inherit from Object.prototype since nodejs/node#6055 (node v6.0.0+)

Merged

Merged

Closed

Closed

Closed

Closed

Open

strugee added a commit to strugee/vows that referenced this pull request

Apr 7, 2017
Previously, we assumed that whatever object the user passed to the
object assertion helpers had its prototype set to Object and would
thus have things like a hasOwnProperty property.
However, it turns out that this is not a valid assumption. This isn't
limited to just corner cases; Node 6.x changed the behavior of its
`querystring` module (which is also used by its `url` module) to
explicitly set the prototype of querystring objects to `null` in order
to prevent key collisions if someone sent a URL query string parameter
with the same key as a property on the prototype. See nodejs/node#6055
for where this change was made.
Therefore, we use Object.prototype.hasOwnProperty, which is guaranteed
to always exist, and call it on the object the user passed in. We do
the same for propertyIsEnumerable as applicable.

Open

Merged

3 tasks

Closed

Trott referenced this pull request

Apr 2, 2019

This was referenced

Jun 19, 2020

Closed

Open

Open

Read the original on github.com ↗