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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.1, 3.5.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Query 2016-12-12

      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.

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

              Created:
              Updated:
              Resolved: