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

Comparison of the scope object in a BSON element of type CodeWScope should not respect the collation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.1, 3.5.1
    • Querying
    • None
    • Fully Compatible
    • ALL
    • Query 2016-12-12

    Description

      When we compare the nested object representing the JavaScript scope in an element of BSONType::CodeWScope, we pass through the StringData comparator:

      https://github.com/mongodb/mongo/blob/r3.4.0-rc5/src/mongo/bson/bsonelement.cpp#L1005

      This is incorrect, since only BSONType::String, or String nested inside Object or Array, should ever use custom string comparison semantics. This means that queries may compare CodeWScope elements incorrectly.

      Attachments

        Issue Links

          Activity

            People

              david.storch@mongodb.com David Storch
              david.storch@mongodb.com David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: