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

Block field names with dollar sign prefix at insert time

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jon.rangel@mongodb.com Jon Rangel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: