BSON deserialization handles does not handle __proto__ properly

XMLWordPrintableJSON

    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      > 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
              Reporter:
              Anna Henningsen
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: