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

Block field names with dollar sign prefix at insert time

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: