Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-410

Validate update object keys when not using $ update operators.

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

      It's currently possible to insert a document with '.' in the keys using update with upsert=True. We may be able to disallow this using the same checks that the mongo shell uses to differentiate between a document replacement (passing a document with no $ operators as the second param) and a modification (passing a document with a $ operator at the top level as the second param).

      See db.foo.update (note no parens) in the shell for details.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: