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

Check BSON MD5 type in the validate command

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • Execution Team 2022-07-25, Execution Team 2022-08-08

    Description

      Currently when we validate BSON Binary data type, we simply skip over it without further checking if the content comply to the specification. Valid MD5s are 16-byte long but in BSON documents they can be arbitrary lengths and we do not check it. We need to make the validate command to catch this inconsistency while not for regular writes.

      We can already create BSON documents with an invalid MD5 in the shell by 

      > db.test.insert({u: BinData(5, "deadbeaf")})
      WriteResult({ "nInserted" : 1 }) 

      We should also add unit tests for this.

      Attachments

        Activity

          People

            damian.wasilewicz@mongodb.com Damian Wasilewicz
            yuhong.zhang@mongodb.com Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: