This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b73cd85b5c55f7c31ab0495f97785f95ca2d9c17
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Nov 8 16:43:48 2023 +0000

    Better message if size limit is reached reading trailer header name
---
 java/org/apache/coyote/http11/filters/ChunkedInputFilter.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
index ebcc0d24f9..57637f8e14 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
@@ -500,6 +500,8 @@ public class ChunkedInputFilter implements InputFilter, 
ApplicationBufferHandler
             } else if (!HttpParser.isToken(chr)) {
                 // Non-token characters are illegal in header names
                 
throwIOException(sm.getString("chunkedInputFilter.invalidTrailerHeaderName"));
+            } else if (trailingHeaders.getEnd() >= trailingHeaders.getLimit()) 
{
+                
throwIOException(sm.getString("chunkedInputFilter.maxTrailer"));
             } else {
                 trailingHeaders.append(chr);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to