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 10a45a5b5c7a30f9546f1fd5dc75848004fd9709
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 5a08b27f8c..17f8081619 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
@@ -560,6 +560,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