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

Able to create document with array as _id using applyOps

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.4.9, 3.6.0
    • Fix Version/s: Backlog
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

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

                Dates

                Created:
                Updated: