You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Adam Rabung (JIRA)" <ji...@apache.org> on 2009/12/04 18:40:20 UTC
[jira] Created: (CODEC-95) Base64: optionally allow strict parsing
of base64 strings
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.
[jira] Updated: (CODEC-95) Base64: optionally allow strict parsing
of base64 strings
Posted by "Adam Rabung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CODEC-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Rabung updated CODEC-95:
-----------------------------
Attachment: strictMode.zip
Not sure how much this will really help, as I don't know much about the base 64 spec or Apache coding guidelines (adding checked exceptions to existing methods?), but it's a start.
> 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.
[jira] Commented: (CODEC-95) Base64: optionally allow strict
parsing of base64 strings
Posted by "Adam Rabung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CODEC-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786172#action_12786172 ]
Adam Rabung commented on CODEC-95:
----------------------------------
Doh, my patch should have been 1.5 compatible (not chaining IOException), and DefaultIllegalEncodingCharacterPolicy should allow ASCII 13 and 10.
> 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.