This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 5badf94e79e5de206fc0ef3054fd536b1bb787cd Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Apr 11 16:41:44 2023 +0100 Fix parameter counting logic --- java/org/apache/tomcat/util/http/Parameters.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/http/Parameters.java b/java/org/apache/tomcat/util/http/Parameters.java index de99e5b190..66fdc9302a 100644 --- a/java/org/apache/tomcat/util/http/Parameters.java +++ b/java/org/apache/tomcat/util/http/Parameters.java @@ -233,13 +233,13 @@ public final class Parameters { return; } - parameterCount++; - if (limit > -1 && parameterCount > limit) { + if (limit > -1 && parameterCount >= limit) { // Processing this parameter will push us over the limit. ISE is // what Request.parseParts() uses for requests that are too big setParseFailedReason(FailReason.TOO_MANY_PARAMETERS); throw new IllegalStateException(sm.getString("parameters.maxCountFail", Integer.valueOf(limit))); } + parameterCount++; ArrayList<String> values = paramHashValues.get(key); if (values == null) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org