[SERVER-32305] Able to create document with array as _id using applyOps Created: 13/Dec/17  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Replication
Affects Version/s: 3.4.9, 3.6.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: William Schultz (Inactive) Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-32952 applyOps does not validate updates Backlog
related to SERVER-27096 applyOps should validate its ops to e... Backlog
Assigned Teams:
Replication
Operating System: ALL
Steps To Reproduce:

use test
db.createCollection("coll");
db.runCommand({applyOps: [{op: "i",o:{ _id: [1,2,3]}, ns:"test.coll" }]});
db.coll.findOne()

Participants:

 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.


Generated at Thu Feb 08 04:29:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.