<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:08:25 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[MONGOCRYPT-304] The base64 url functions in kms_message trim &quot;=&quot; padding from the final output</title>
                <link>https://jira.mongodb.org/browse/MONGOCRYPT-304</link>
                <project id="17481" key="MONGOCRYPT">Libmongocrypt</project>
                    <description>&lt;p&gt;The functions that convert regular base64 to url safe base64 terminate their loops on &apos;=&apos; which trims the &apos;=&apos; 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.&lt;/p&gt;

&lt;p&gt;See&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/blob/master/kms-message/src/kms_b64.c#L522-L524&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/blob/master/kms-message/src/kms_b64.c#L522-L524&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/blob/master/kms-message/src/kms_b64.c#L556-L558&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/blob/master/kms-message/src/kms_b64.c#L556-L558&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1592719">MONGOCRYPT-304</key>
            <summary>The base64 url functions in kms_message trim &quot;=&quot; padding from the final output</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="mark.benvenuto@mongodb.com">Mark Benvenuto</assignee>
                                    <reporter username="mark.benvenuto@mongodb.com">Mark Benvenuto</reporter>
                        <labels>
                    </labels>
                <created>Sat, 16 Jan 2021 00:32:06 +0000</created>
                <updated>Sat, 28 Oct 2023 10:25:33 +0000</updated>
                            <resolved>Thu, 21 Jan 2021 17:29:00 +0000</resolved>
                                                    <fixVersion>1.2.0</fixVersion>
                                    <component>kms_message</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3573247" author="xgen-internal-githook" created="Wed, 20 Jan 2021 12:37:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mark Benvenuto&apos;, &apos;email&apos;: &apos;markbenvenuto@users.noreply.github.com&apos;, &apos;username&apos;: &apos;markbenvenuto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/MONGOCRYPT-304&quot; title=&quot;The base64 url functions in kms_message trim &amp;quot;=&amp;quot; padding from the final output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MONGOCRYPT-304&quot;&gt;&lt;del&gt;MONGOCRYPT-304&lt;/del&gt;&lt;/a&gt; Fix base64 URL safe padding (#155)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/commit/ad789a84b7b33ee54a9c0593f1287d22abfd5bb6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/commit/ad789a84b7b33ee54a9c0593f1287d22abfd5bb6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3571538" author="mark.benvenuto" created="Tue, 19 Jan 2021 16:54:28 +0000"  >&lt;p&gt;Yeah, I see in the RFC&lt;br/&gt;
&lt;ins&gt;5.  Base 64 Encoding with URL and Filename Safe Alphabet&lt;/ins&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;   The pad character &quot;=&quot; is typically percent-encoded when used in an&lt;br/&gt;
   URI &lt;span class=&quot;error&quot;&gt;&amp;#91;9&amp;#93;&lt;/span&gt;, but if the data length is known implicitly, this can be&lt;br/&gt;
   avoided by skipping the padding; see section 3.2.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;ins&gt;3.2.  Padding of Encoded Data&lt;/ins&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;   In some circumstances, the use of padding (&quot;=&quot;) in base-encoded data&lt;br/&gt;
   is not required or used.  In the general case, when assumptions about&lt;br/&gt;
   the size of transported data cannot be made, padding is required to&lt;br/&gt;
   yield correct decoded data.&lt;/p&gt;

&lt;p&gt;   Implementations MUST include appropriate pad characters at the end of&lt;br/&gt;
   encoded data unless the specification referring to this document&lt;br/&gt;
   explicitly states otherwise.&lt;/p&gt;

&lt;p&gt;   The base64 and base32 alphabets use padding, as described below in&lt;br/&gt;
   sections 4 and 6, but the base16 alphabet does not need it; see&lt;br/&gt;
   section 8.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1535116">SERVER-52651</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hybnun:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4571">Security 2021-01-25</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>