Skip to content
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

Add a configuration property to customize the Tomcat connector's max parameter count #43275

Closed
rafaello7 opened this issue Nov 23, 2024 · 5 comments · May be fixed by #43286
Closed

Add a configuration property to customize the Tomcat connector's max parameter count #43275

rafaello7 opened this issue Nov 23, 2024 · 5 comments · May be fixed by #43286
Labels
status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@rafaello7
Copy link

Tomcat has a limit of HTML form parameter count, which is 10000 by default. Currently the limit change is possible in Spring Boot only programmatically. On the other hand, the Undertow embedded server has a property server.undertow.max-parameters. Could it be possible to have such property for Tomcat also?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 23, 2024
@wilkinsona wilkinsona changed the title Add property to customize embedded Tomcat maximum HTML form parameter count Add a configuration property to customize the Tomcat connector's max parameter count Nov 23, 2024
@wilkinsona
Copy link
Member

Thanks for the suggestion, @rafaello7.

It looks like the proposed property would map onto org.apache.catalina.connector.Connector#setMaxParameterCount(int). There's also org.eclipse.jetty.ee10.servlet.ServletContextHandler#setMaxFormKeys(int) for Jetty that looks like it serves a very similar purpose. We may want to add a property for that as well.

@violetagg is there a similar setting in Reactor Netty?

@wilkinsona wilkinsona added the status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team label Nov 23, 2024
@violetagg
Copy link
Member

violetagg commented Nov 25, 2024

@wilkinsona Reactor Netty does not parse the request line (query string), this is done by Spring Framework's parser. Also I can see that this configuration maxParameterCount is also relevant to multipart. Reactor Netty multipart implementation is not used by Spring Framework as it uses its own.


maxParameterCount - The maximum total number of request parameters (including uploaded files) obtained from the query
string and, for POST requests, the request body if the content type is application/x-www-form-
urlencoded or multipart/form-data. Requests that exceed this limit will be rejected. A value of less than 0 means no limit. If
not specified, a default of 1000 is used.

@wilkinsona
Copy link
Member

wilkinsona commented Nov 25, 2024

Thanks, Violeta. So we'd keep this as a web server-specific setting. I've opened #43280 for the Jetty side of things.

@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Nov 25, 2024
@wilkinsona wilkinsona added this to the 3.x milestone Nov 25, 2024
quaff added a commit to quaff/spring-boot that referenced this issue Nov 26, 2024
quaff added a commit to quaff/spring-boot that referenced this issue Nov 26, 2024
@wilkinsona
Copy link
Member

With thanks to @quaff for the reminder, #42448 already took care of the adding the equivalent property for Jetty.

@wilkinsona
Copy link
Member

Closing in favor of #43286.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@wilkinsona wilkinsona removed this from the 3.x milestone Nov 26, 2024
@wilkinsona wilkinsona added the status: superseded An issue that has been superseded by another label Nov 26, 2024
quaff added a commit to quaff/spring-boot that referenced this issue Nov 27, 2024
quaff added a commit to quaff/spring-boot that referenced this issue Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
4 participants