-
Notifications
You must be signed in to change notification settings - Fork 38.5k
ResourceUrlEncodingFilter throws StringIndexOutOfBoundsException when %ED%B6 is in the URL path #22851
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
Comments
There is some kind of mismatch between the way |
There appears to be an invalid encoded char sequence in the given URL:
Servlet containers fall back on different encoding (Jetty falls back on ISO-8859-1 but Tomcat appears to fall back on US ASCII) and so the Servlet path can't be compared to the decoded request URI. I've added an assertion to fail proactively with a more helpful message. |
Affects: 5.1.6
A request with %ED%B6 in the path (e.g. http://example.org/%ED%B6) will fail with a 500 http response code and this exception:
This only happens when having these two dependencies (managed versions by spring-boot-2.1.4.RELEASE) in the pom:
See spring-attic/spring-framework-issues#190 for an example.
Also for context, the complete path was %CE%D2%BA%C3%CF%EB%C4%E3%C8%C3%C8%AB%CA%C0%BD%E7%D6%AA%B5%C0%CE%D2%B0%AE%C4%E3%D0%ED%B6%E0%C4%EA%D2%D4%BA%F3%C0%CB%D7%D3%BB%D8%CD%B7%C5%AE%C8%CB%B5%C4%D1%A1%D4%F1, but it appears that only having %ED%B6 is enough for that bug.
The text was updated successfully, but these errors were encountered: