Skip to content

Redirect views mangle extended UTF-8 Characters [SPR-9072] #13710

@spring-projects-issues

Description

@spring-projects-issues

Kenneth DeLong opened SPR-9072 and commented

Our application has URLs that are in many languages, including Arabic, Chinese, and Russian. The URLs may contain these extended characters, e.g. /thread/13741/%D8%A8%D8%AF%D9%87%D8%A7-%D8%B5%D8%A8%D8%B1.

In our controller, we return a view name of
return "redirect:" + uri;
Where the variable "uri" is a java.lang.String of the form "/thread/13741/<arabic characters>".

The view resolution framework does not handle this well, it totally mangles the Arabic characters, turning them into something like /thread/13741/%28/G%27-5%281.

RedirectView (and friends) should properly percent-encode the string before issuing the redirect.


Affects: 3.1 GA

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions