Updates allow creating $id/ref/db prefixed fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.4
    • Affects Version/s: 2.5.3
    • Component/s: Write Ops
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Expected behavior is something along the lines of...

      > db.foo.update({x:4},{$currentDate: {$x: true}})
      $x contains field names with leading '$' character

      However, the following is allowed and creates the $prefixed field.

      > db.foo.update({x:4},{$currentDate: {$idfoo: true}})
      > db.foo.find()
      { "_id" : ObjectId("525d7ae386ef72ddfdcdaf13"), "x" : 4, "$idfoo" : ISODate("2013-10-17T15:54:58.341Z") }

      This logic (bug) is in field_checker.cpp in the isUpdatable function where it is allowing DBRef related fields.

              Assignee:
              Scott Hernandez (Inactive)
              Reporter:
              Amalia Hawkins (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: