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

Block field names with dollar sign prefix at insert time

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: