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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0
    • Affects Version/s: None
    • Component/s: kms_message
    • None

      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

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

              Created:
              Updated:
              Resolved: