[
https://issues.apache.org/jira/browse/CXF-7858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colm O hEigeartaigh reassigned CXF-7858:
----------------------------------------
Assignee: Colm O hEigeartaigh
> 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
>
> {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)