Comment on 8259896: Base64 MIME decoder should allow unrecognised characters within padding

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Comment on 8259896: Base64 MIME decoder should allow unrecognised characters within padding

Raffaello Giulietti
Hi,

in my opinion, the reporter of [1] is right in requiring that extraneous
characters be discarded, even inside the padding.

Indeed, the first full paragraph on [2] reads:

"Any characters outside of the base64 alphabet are to be ignored in
base64-encoded data."

where "the base64 alphabet" also includes the padding character '=' and
"base64-encoded data" extends to padding as well, because padding is an
essential part of encoding.

The legitimate doubt expressed in comment [3] should thus be solved in
favor of a bug fix.


My 2 cents
Greetings
Raffaello

----

[1] https://bugs.openjdk.java.net/browse/JDK-8259896
[2] https://tools.ietf.org/html/rfc2045#page-26
[3]
https://bugs.openjdk.java.net/browse/JDK-8259896?focusedCommentId=14395485&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14395485

Reply | Threaded
Open this post in threaded view
|

Re: Comment on 8259896: Base64 MIME decoder should allow unrecognised characters within padding

Jaikiran Pai
Hello Raffaello,

I have added this comment from you, to that JDK-8259896 issue.

-Jaikiran

On 02/02/21 12:43 am, Raffaello Giulietti wrote:

> Hi,
>
> in my opinion, the reporter of [1] is right in requiring that
> extraneous characters be discarded, even inside the padding.
>
> Indeed, the first full paragraph on [2] reads:
>
> "Any characters outside of the base64 alphabet are to be ignored in
> base64-encoded data."
>
> where "the base64 alphabet" also includes the padding character '='
> and "base64-encoded data" extends to padding as well, because padding
> is an essential part of encoding.
>
> The legitimate doubt expressed in comment [3] should thus be solved in
> favor of a bug fix.
>
>
> My 2 cents
> Greetings
> Raffaello
>
> ----
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8259896
> [2] https://tools.ietf.org/html/rfc2045#page-26
> [3]
> https://bugs.openjdk.java.net/browse/JDK-8259896?focusedCommentId=14395485&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14395485
>