[SERVER-10987] Disallow inserting documents with invalid field names (nested) Created: 01/Oct/13  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-308 BSON Key Validation in Drivers Closed
Duplicate
is duplicated by SERVER-10002 Possible to create docs with dotted f... Closed
is duplicated by SERVER-24589 Server allows storing documents with ... Closed
is duplicated by SERVER-16525 Block field names with dollar sign pr... Closed
Related
related to DOCS-4250 $rename cannot rename fields that con... Closed
related to SERVER-12393 can't turn off insert validation for ... Closed
related to SERVER-30575 Please add escaping convention for do... Backlog
is related to SERVER-56462 Field starting with dollar in an embe... Closed
is related to SERVER-10547 Do lightweight insert check (not deep... Closed
Assigned Teams:
Query Optimization
Operating System: ALL
Participants:
Case:

 Description   

Currently the insert checks do not validate past the first level of fields, and for performance reasons this may be hard to do without causing issues.

Example of where this is not validated on the server:

{_id:1, "a" : { "a.b":1, "$foo":1}}



 Comments   
Comment by Kyle Suarez [ 03/Apr/17 ]

As a part of SERVER-28347, we added depth validation to inserted documents in this commit. We could probably add to that function to perform this additional validation, as we're already recursing through the document anyway.

Comment by Ian Whalen (Inactive) [ 22/Feb/16 ]

Marking this as 3.3 Desired, but doing it will hinge on doing some perf checking.

Generated at Thu Feb 08 03:24:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.