Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

querystring.parse shouldn't include stuff from Object.prototype #1497

Closed
thejh opened this issue Aug 11, 2011 · 1 comment
Closed

querystring.parse shouldn't include stuff from Object.prototype #1497

thejh opened this issue Aug 11, 2011 · 1 comment

Comments

@thejh
Copy link

thejh commented Aug 11, 2011

Dunno whether it should error out or just set the property, but including prototype methods seems wrong.

[jann@Jann-PC node]$ node
> require("querystring").parse("toString=foo&valueOf=bar&__defineGetter__=baz")
{ toString: [ [Function: toString], 'foo' ],
  valueOf: [ [Function: valueOf], 'bar' ],
  __defineGetter__: [ [Function: __defineGetter__], 'baz' ] }
> 
@isaacs
Copy link

isaacs commented Aug 11, 2011

Yeah, it should set the property. that's a bug.

@isaacs isaacs closed this as completed in 3210809 Aug 11, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants