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

Validate update object keys when not using $ update operators.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            behackett Bernie Hackett
            Reporter:
            behackett Bernie Hackett
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: