Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3153

BSON deserialization handles does not handle __proto__ properly

    • 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.

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: