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

The base64 url functions in kms_message trim "=" padding from the final output

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.2.0
    • kms_message
    • None

    Description

      The functions that convert regular base64 to url safe base64 terminate their loops on '=' which trims the '=' padding from the final output. While the Azure base64 decoder tolerates the missing padding, it is incorrect and was discovered while testing against a python mock server.

      See
      https://github.com/mongodb/libmongocrypt/blob/master/kms-message/src/kms_b64.c#L522-L524
      https://github.com/mongodb/libmongocrypt/blob/master/kms-message/src/kms_b64.c#L556-L558

      Attachments

        Issue Links

          Activity

            People

              mark.benvenuto@mongodb.com Mark Benvenuto
              mark.benvenuto@mongodb.com Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: