[
https://issues.apache.org/jira/browse/CODEC-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781465#action_12781465
]
Chris Pimlott edited comment on CODEC-91 at 11/23/09 4:38 PM:
--------------------------------------------------------------
It's not clear to me if the old behavior was strictly a bug, given the "may".
RFC4648 states:
Furthermore, such specifications MAY ignore the pad
character, "=", treating it as non-alphabet data, if it is present
before the end of the encoded data.
http://tools.ietf.org/html/rfc4648#section-3.3
It sounds like either way (ignoring or stopping) of treating the embedded "="
is acceptable, which would recast the change as an implementation decision,
rather than a bug fix.
At the very least, the change in behavior should have been made clear in the
release notes and in the javadoc. An option to restore the previous behavior
would be appreciated as well.
was (Author: pimlottc):
It's not clear to me if the old behavior was strictly a bug, given the
"may". RFC4648 states:
Furthermore, such specifications MAY ignore the pad
character, "=", treating it as non-alphabet data, if it is present
before the end of the encoded data.
http://tools.ietf.org/html/rfc4648#section-3.3
It sounds like either way (ignoring or stopping) of treating the embedded "="
is acceptable, which would recast the change as a implementation decision,
rather than a bug fix.
At the very least, the change in behavior should have been made clear in the
release notes and in the javadoc. An option to restore the previous behavior
would be appreciated as well.
> Handling of embedded padding in base64 encoded data changed in 1.4
> ------------------------------------------------------------------
>
> Key: CODEC-91
> URL: https://issues.apache.org/jira/browse/CODEC-91
> Project: Commons Codec
> Issue Type: Bug
> Affects Versions: 1.4
> Reporter: Chris Pimlott
>
> 1.4 changed the way that embedded padding characters (i.e. "=") were handled
> when decoding base64 data. Previously, the decoder ignored them and decoded
> all the data. Now it stops upon encountering the first padding byte. This
> breaks compatibility with previous versions.
> For example, in 1.4,
> b64.decode("Y29tbW9ucwo=".getBytes());
> gives the same result as
> b64.decode("Y29tbW9ucwo=Y29tbW9ucwo=".getBytes());
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.