You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an object is created using Object.create(null) it does not contain properties that are inherited from Object for example hasOwnProperty or __proto__
This becomes an issue when someone is using query-string npm package https://www.npmjs.com/package/query-string
This packages parse method creates a parsed object with Object.create(null);
I think we will have to place in a check for the existence of these properties on an object and only then handle them correctly.
@samdenty If it's alright then I would like to pick up this issue and propose a solution around the same.
The text was updated successfully, but these errors were encountered:
vivek12345
changed the title
_handlePlainObject breaks for objects created with Object.create(null)
Code breaks for objects created with Object.create(null)
Nov 24, 2018
When an object is created using Object.create(null) it does not contain properties that are inherited from Object for example
hasOwnProperty
or__proto__
Inside
EncodingTransformer.prototype._handlePlainObject
this causes an issue where in we depend onhasOwnProperty
and also on__proto__
.https://github.com/samdenty/console-feed/blob/master/src/Transform/replicator/index.ts#L98
This becomes an issue when someone is using
query-string
npm packagehttps://www.npmjs.com/package/query-string
This packages
parse
method creates a parsed object with Object.create(null);I think we will have to place in a check for the existence of these properties on an object and only then handle them correctly.
@samdenty If it's alright then I would like to pick up this issue and propose a solution around the same.
The text was updated successfully, but these errors were encountered: