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

Able to create document with array as _id using applyOps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • 3.4.9, 3.6.0
    • None
    • 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()

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: