You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jan Ivenz (JIRA)" <ji...@apache.org> on 2012/10/09 14:46:03 UTC

[jira] [Created] (CODEC-160) Base64.encodeBase64URLSafeString doesn't add padding characters at the end.

Jan Ivenz created CODEC-160:
-------------------------------

             Summary: Base64.encodeBase64URLSafeString doesn't add padding characters at the end.
                 Key: CODEC-160
                 URL: https://issues.apache.org/jira/browse/CODEC-160
             Project: Commons Codec
          Issue Type: Bug
            Reporter: Jan Ivenz


If the url safe method is used the padding characters are missing, resulting in a too short string as output.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CODEC-160) Base64.encodeBase64URLSafeString doesn't add padding characters at the end.

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CODEC-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472592#comment-13472592 ] 

Sebb commented on CODEC-160:
----------------------------

This appears to be deliberate; see comments in the method:

Base64.encode(byte[] in, int inPos, int inAvail, Context context)
                
> Base64.encodeBase64URLSafeString doesn't add padding characters at the end.
> ---------------------------------------------------------------------------
>
>                 Key: CODEC-160
>                 URL: https://issues.apache.org/jira/browse/CODEC-160
>             Project: Commons Codec
>          Issue Type: Bug
>            Reporter: Jan Ivenz
>              Labels: base64
>
> If the url safe method is used the padding characters are missing, resulting in a too short string as output.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CODEC-160) Base64.encodeBase64URLSafeString doesn't add padding characters at the end.

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CODEC-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472602#comment-13472602 ] 

Sebb commented on CODEC-160:
----------------------------

Further research shows that this has been the case since the code was added by CODEC-75.

The current behaviour needs to be documented.
                
> Base64.encodeBase64URLSafeString doesn't add padding characters at the end.
> ---------------------------------------------------------------------------
>
>                 Key: CODEC-160
>                 URL: https://issues.apache.org/jira/browse/CODEC-160
>             Project: Commons Codec
>          Issue Type: Bug
>            Reporter: Jan Ivenz
>              Labels: base64
>
> If the url safe method is used the padding characters are missing, resulting in a too short string as output.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CODEC-160) Base64.encodeBase64URLSafeString doesn't add padding characters at the end.

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CODEC-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved CODEC-160.
------------------------

       Resolution: Fixed
    Fix Version/s: 1.8

URL: http://svn.apache.org/viewvc?rev=1396159&view=rev
Log:
CODEC-160 Base64.encodeBase64URLSafeString doesn't add padding characters at the end.
Javadoc updated to clarify this

Modified:
    commons/proper/codec/trunk/src/changes/changes.xml
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java
                
> Base64.encodeBase64URLSafeString doesn't add padding characters at the end.
> ---------------------------------------------------------------------------
>
>                 Key: CODEC-160
>                 URL: https://issues.apache.org/jira/browse/CODEC-160
>             Project: Commons Codec
>          Issue Type: Bug
>            Reporter: Jan Ivenz
>              Labels: base64
>             Fix For: 1.8
>
>
> If the url safe method is used the padding characters are missing, resulting in a too short string as output.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira