-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: bson-4.2.3
-
Component/s: BSON
-
Empty show more show less
-
Not Needed
> const input = { ['__proto__']: { a: 42 } } undefined > output = bson.deserialize(bson.serialize(input)) {} > Object.getPrototypeOf(output) { a: 42 }
The own named property __proto__ should be preserved as-is, i.e. the output object should have a property with that name just like the input object, and instead keep Object.prototype as its own prototype.
- is duplicated by
-
NODE-3040 deserializer does not handle fields named __proto__
- Closed
- links to