Skip to content

surface invalid base64 as a lexical error in the rich parser#39

Open
aizu-m wants to merge 1 commit into
apache:trunkfrom
aizu-m:richparser-base64-lexical-error
Open

surface invalid base64 as a lexical error in the rich parser#39
aizu-m wants to merge 1 commit into
apache:trunkfrom
aizu-m:richparser-base64-lexical-error

Conversation

@aizu-m
Copy link
Copy Markdown

@aizu-m aizu-m commented Jun 8, 2026

the JDK MIME decoder throws IllegalArgumentException on malformed base64 such as a lone "A" and never returns null, so getBase64Value and both getAttributeBase64Value overloads let it escape rather than the documented InvalidLexicalValueException (the null check was already dead code), and wrapping the decode makes a bad value from untrusted XML surface as a lexical error like the sibling date and duration getters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant