commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raphael Ackermann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CODEC-91) Handling of embedded padding in base64 encoded data changed in 1.4
Date Wed, 19 May 2010 14:34:54 GMT

    [ https://issues.apache.org/jira/browse/CODEC-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869146#action_12869146
] 

Raphael Ackermann commented on CODEC-91:
----------------------------------------

This might be related: When decoding a one byte string as shown below, the new behaviour returns
an empty byte array whereas before it would return a byte array with 0 in it.

String enc = "1";
byte[] result = Base64.decodeBase64(enc.getBytes())

where in 1.3 result would be [0]
and in 1.4 result is an empty byte array []



> 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
>         Attachments: codec-91.patch
>
>
> 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.


Mime
View raw message