Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32305

Able to create document with array as _id using applyOps

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.9, 3.6.0
    • Component/s: Replication
    • None
    • Replication
    • ALL
    • Hide
      use test
      db.createCollection("coll");
      db.runCommand({applyOps: [{op: "i",o:{ _id: [1,2,3]}, ns:"test.coll" }]});
      db.coll.findOne()
      
      Show
      use test db.createCollection( "coll" ); db.runCommand({applyOps: [{op: "i" ,o:{ _id: [1,2,3]}, ns: "test.coll" }]}); db.coll.findOne()

      It is possible to create a document whose _id field is an array by means of the applyOps command. This should be disallowed. This was repro'd in MongoDB 3.6.0 and MongoDB 3.4.9.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            william.schultz@mongodb.com William Schultz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: