Skip to content

RFC2231Utils decodeText - Incorrect handling of percent encoded text#472

Open
Chenjp wants to merge 3 commits into
apache:masterfrom
Chenjp:rfc2231_iae_unexpected_decoded
Open

RFC2231Utils decodeText - Incorrect handling of percent encoded text#472
Chenjp wants to merge 3 commits into
apache:masterfrom
Chenjp:rfc2231_iae_unexpected_decoded

Conversation

@Chenjp
Copy link
Copy Markdown

@Chenjp Chenjp commented May 21, 2026

Issue: decoded text does not conform rfc2231 was incorrectly decoded, e.g., utf-8''%3\u8a35 -> 5

Expectation: illegal format.

Code change: check the next 2 chars after percent %, ensure %HH format per RFC 2231, raise iae if not.

Testcase attached.

Issue:
    utf-8''%3\u8a35 -> 5
Expectation: illegal format.

raise iae when decode '%3\u8a35'.
Copy link
Copy Markdown
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chenjp
Your PR breaks the build. Please test before you push, otherwise you're wasting our time and resources.

@Chenjp
Copy link
Copy Markdown
Author

Chenjp commented May 22, 2026

@Chenjp Your PR breaks the build. Please test before you push, otherwise you're wasting our time and resources.

😳sigh...
uncomment it to make it work. testcases passed.

@Chenjp Chenjp requested a review from garydgregory May 22, 2026 14:11
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.

2 participants