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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.2.0
    • Affects Version/s: None
    • Component/s: kms_message
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: