Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-146

`ismaster` check in whitelist should be case insensitive

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      For whatever reason the node driver sends ismaster instead of isMaster, which results in encryption failure with libmongocrypt

      > db.runCommand({ ismaster: 1 })
      {
          "ismaster" : true,
          "maxBsonObjectSize" : 16777216,
          "maxMessageSizeBytes" : 48000000,
          "maxWriteBatchSize" : 100000,
          "localTime" : ISODate("2019-06-05T00:27:09.649Z"),
          "logicalSessionTimeoutMinutes" : 30,
          "connectionId" : 132,
          "minWireVersion" : 0,
          "maxWireVersion" : 8,
          "readOnly" : false,
          "ok" : 1
      }
      > db.runCommand({ isMaster: 1 })
      {
          "ismaster" : true,
          "maxBsonObjectSize" : 16777216,
          "maxMessageSizeBytes" : 48000000,
          "maxWriteBatchSize" : 100000,
          "localTime" : ISODate("2019-06-05T00:27:13.211Z"),
          "logicalSessionTimeoutMinutes" : 30,
          "connectionId" : 132,
          "minWireVersion" : 0,
          "maxWireVersion" : 8,
          "readOnly" : false,
          "ok" : 1
      }
      

      While we may make the change to use the camel case form in the driver, I would prefer not to make that change today. Can we change the check in libmongocrypt to use stricmp for this command?

      Attachments

        Activity

          People

            kevin.albertson@mongodb.com Kevin Albertson
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: