Skip to content

Support unicode characters in the json parser#3142

Merged
coheigea merged 1 commit into
mainfrom
coheigea/json-unicode
May 26, 2026
Merged

Support unicode characters in the json parser#3142
coheigea merged 1 commit into
mainfrom
coheigea/json-unicode

Conversation

@coheigea
Copy link
Copy Markdown
Contributor

JSON allows you to write any character using a backslash-u escape — for example, \u006e means the letter n. The CXF parser was ignoring these escapes completely and just returning the raw text. So if a JWT contained "alg":"\u006e\u006f\u006e\u0065", CXF's parser would give you the 24-character string \u006e\u006f\u006e\u0065 rather than the 4-character string none. CXF's own algorithm check would look at that ugly literal string, not recognise it as none, and pass it through — while a different, standards-compliant parser further down the chain would decode it correctly and see none, potentially disabling signature verification.

@coheigea coheigea merged commit 4197b3f into main May 26, 2026
5 checks passed
coheigea added a commit that referenced this pull request May 26, 2026
@coheigea coheigea deleted the coheigea/json-unicode branch May 26, 2026 07:15
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