ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.16, 9.0.7, 8.0.37, 7.0.48
    • Affects Version/s: None
    • Component/s: None
    • Server Security
    • Fully Compatible
    • ALL
    • v9.0, v8.3, v8.0, v7.0
    • Server Security 2026-07-31, Server Security 2026-08-14, Server Security 2026-08-28, Server Security 2026-09-11, Server Security 2026-10-23, Server Security 2026-11-06, Server Security 2026-11-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Duplicate keys are valid in $jsonSchema, but are not handled in CSFLE processing.

      Multiple `properties` keys of the same name are processed with a "last-wins" map assignment during encryption schema tree construction (`_propertiesChildren[std::string

      {nextChild}

      ] = std::move(node);` in `addChild()` in `encryption_schema_tree.cpp`). 

      Similarly, multiple `patternProperties` nodes with identical regex are currently processed with a "first-wins" std::set insert in `addPatternPropertiesChild()` in  `encryption_schema_tree.h`.

      Instead of dropping duplicate keys silently, which may lead to confusing or unexpected behavior for the user (such as a field's encryption information being overwritten), we should assert on duplicate keys and fail with a FailedToParse for both `properties` and `patternProperties`.

            Assignee:
            Sam Frank
            Reporter:
            Sam Frank
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: