[
https://issues.apache.org/jira/browse/CODEC-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985836#action_12985836
]
Julius Davies commented on CODEC-95:
------------------------------------
This jar is surprisingly popular, and I think a lot of our users would be quite
surprised if it started throwing exceptions in places where it hasn't thrown an
exception in 8 years.
[Look how much trouble we got into for accidentally adding "\r\n" to some
outputs: CODEC-89 !!!]
I will add a new static method, Base64.isStringBase64(String base64), shortly.
If you create RejectingInputStream.java and add that as a patch, people could
also do this:
myStream = new Base64InputStream(new RejectingInputStream(myStream));
> Base64: optionally allow strict parsing of base64 strings
> ---------------------------------------------------------
>
> Key: CODEC-95
> URL: https://issues.apache.org/jira/browse/CODEC-95
> Project: Commons Codec
> Issue Type: Improvement
> Affects Versions: 1.4
> Reporter: Adam Rabung
> Priority: Minor
> Attachments: strictMode.zip
>
>
> Currently, Codec skips base64 characters that are outside of the encode
> table. I realize this is perfectly to spec, but I wonder if other users
> might appreciate a "strict" mode that throws an exception when one of these
> illegal characters are encountered. For example, I would love an exception
> to be thrown here:
> new Base64().decode("!@#$ iHaveIllegalCharsAtBeginningAndEnd %^&"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.