[SERVER-16525] Block field names with dollar sign prefix at insert time Created: 12/Dec/14  Updated: 14/Dec/14  Resolved: 12/Dec/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Jon Rangel (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-10987 Disallow inserting documents with inv... Backlog
Participants:

 Description   

As reported in CXX-443, with MongoDB 2.6 and the right driver (in this case the 26compat C++ driver) it is possible to insert a document that contains a field prefixed with a dollar sign, whereas for a corresponding update the server returns an error:

"The dollar ($) prefixed field '$unwind' in 'pipeline.0.$unwind' is not valid for storage."

This seems inconsistent and unintuitive. The server should prevent dollar sign prefixed fields (and more generally, fields containing any reserved characters) from entering the system.



 Comments   
Comment by Scott Hernandez (Inactive) [ 12/Dec/14 ]

Dup of SERVER-10987

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