This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 9e9037aad8 Fix. Should be 0x20 rather than 20
9e9037aad8 is described below
commit 9e9037aad8a0dc97cf28cfa446418c5acf773667
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Apr 22 18:07:43 2026 +0100
Fix. Should be 0x20 rather than 20
This is actually a NO-OP since all control characters are rejected
earlier in the processing but fixing this for consistency / correctness.
---
java/org/apache/catalina/connector/CoyoteAdapter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 976d98ef94..4c9fa7dfd4 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -1285,7 +1285,7 @@ public class CoyoteAdapter implements Adapter {
byte b2 = bytes[pos + 2];
pos += 3;
int decoded = (HexUtils.getDec(b1) << 4) +
HexUtils.getDec(b2);
- if (decoded < 20 || decoded == 0x7F || decoded == 0x2F) {
+ if (decoded < 0x20 || decoded == 0x7F || decoded == 0x2F) {
return true;
}
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]