Skip to content

Fix non-ASCII character handling in StringUtils.uriDecode #32373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

dumbbelloper
Copy link

StringUtils.uriDecode now correctly handles non-ASCII characters regardless of the presence of "%" encoding.

Previously, the method took two different paths depending on whether "%" was found, leading to incorrect handling of non-ASCII characters in the absence of "%" encoding.

This fix ensures that all characters, including non-ASCII ones, are properly decoded using the provided Charset, improving the method's reliability and consistency across all inputs.

This change addresses issues with decoding multibyte characters and ensures compatibility with a wider range of character encodings, enhancing the utility's overall functionality.

#32360

StringUtils.uriDecode now correctly handles non-ASCII characters regardless of the presence of "%" encoding.

Previously, the method took two different paths depending on whether "%" was found, leading to incorrect handling of non-ASCII characters in the absence of "%" encoding.

This fix ensures that all characters, including non-ASCII ones, are properly decoded using the provided Charset, improving the method's reliability and consistency across all inputs.

This change addresses issues with decoding multibyte characters and ensures compatibility with a wider range of character encodings, enhancing the utility's overall functionality.

spring-projects#32360
@pivotal-cla
Copy link

@dumbbelloper Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@dumbbelloper Thank you for signing the Contributor License Agreement!

@poutsma
Copy link
Contributor

poutsma commented Mar 5, 2024

Thank you for submitting a PR. Unfortunately, we have decided to take a different route in 646bd7f.

@poutsma poutsma closed this Mar 5, 2024
@poutsma poutsma added status: declined A suggestion or change that we don't feel we should currently apply in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 5, 2024
@dumbbelloper dumbbelloper deleted the fix-uri-decode-issue branch March 6, 2024 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants