-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Provide configuration properties for configuring Tomcat's relaxed path and query chars #17510
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
Conversation
Prevent Tomcat rejecting requests that contain unencoded characters.
I wonder if we should consider enabling both of these my default? @markt-asf would there be any significant downsides? Did you consider changing the Tomcat defaults ever? |
+1 for exposing these as configuration properties, but I wouldn't like to see Spring Boot configure non spec compliant behavior by default. |
Tomcat tightened up parsing to address security issues (request injection and such). There are some characters that are probably safe but my strong preference is that Tomcat is spec compliant by default. |
only ref doc
|
Thanks for the input everyone. We're going to add the properties but keep the defaults as they are. |
@dirkdeyne thank you for making your first contribution to Spring Boot. I've polished your proposal by using a list of characters rather than the raw string that Tomcat uses. This is also a chance for us to provide dedicated metadata for valid values, |
How can i configured this properties with yml.
If i do like this, So I have to with
or
|
@qrqhuang You can also do the following: server:
tomcat:
relaxed-query-chars: "[,]" |
Hello, this new tomcat relaxed-query-chars works perfectly with spring boot 2.2.5 |
@et00448 |
Make Tomcat's Context attributes relaxedPathChars and relaxedQueryChars configurable in application.properties
Fixes gh-17509