You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/03/06 23:13:01 UTC
[jira] [Closed] (GROOVY-8357) EncodingGroovyMethods.decodeBase64()
throws "bad character in base64 value" when meets \t \r
[ https://issues.apache.org/jira/browse/GROOVY-8357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8357.
-----------------------------
> EncodingGroovyMethods.decodeBase64() throws "bad character in base64 value" when meets \t \r
> --------------------------------------------------------------------------------------------
>
> Key: GROOVY-8357
> URL: https://issues.apache.org/jira/browse/GROOVY-8357
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 2.4.12
> Reporter: Xin
> Assignee: Paul King
> Priority: Major
> Fix For: 2.4.13
>
>
> EncodingGroovyMethods.decodeBase64() throws "bad character in base64 value" RuntimeException when the method meets \t \r character.
> I found in org.codehaus.groovy.runtime.EncodingGroovyMethodsSupport.TRANSLATE_TABLE has a mistake:
> static final byte[] TRANSLATE_TABLE = (
> "\u0042\u0042\u0042\u0042\u0042\u0042\u0042\u0042"
> // {color:red}\t{color} {color:yellow}\n{color} {color:blue}\r{color}
> + "\u0042{color:red}\u0042{color}{color:yellow}\u0041{color}\u0041\u0042{color:blue}\u0042{color}\u0041\u0042"
> ...
> I mark them in color.
> I believe it's an offset mistake.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)