[ 
https://issues.apache.org/jira/browse/CXF-7858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16635196#comment-16635196
 ] 

ASF GitHub Bot commented on CXF-7858:
-------------------------------------

andriymahats opened a new pull request #452: CXF-7858 fix decoding too
URL: https://github.com/apache/cxf/pull/452
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Base64 empty string encoding issue
> ----------------------------------
>
>                 Key: CXF-7858
>                 URL: https://issues.apache.org/jira/browse/CXF-7858
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2.6
>            Reporter: Andriy Mahats
>            Assignee: Colm O hEigeartaigh
>            Priority: Blocker
>             Fix For: 3.2.7, 3.1.18
>
>
> {code:java}
> char[] chunk = Base64Utility.encodeChunk("".getBytes(), 0, 0, true); // chunk 
>  = null after evaluation
> {code}
> According to [https://tools.ietf.org/html/rfc4648#section-10]
> h2. [10|https://tools.ietf.org/html/rfc4648#section-10]. Test Vectors
>  
>  BASE64("") = ""
>  
> {code:java}
> // later it evaluates to null
> //org.apache.cxf.common.util.Base64UrlUtility#encodeChunk
>  public static String encodeChunk(byte[] id, int offset, int length) {
>         char[] chunk = Base64Utility.encodeChunk(id, offset, length, true);
>         return chunk != null ? new String(chunk) : null;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to