alpire commented on a change in pull request #176: CoyoteAdapter: fix 
out-of-bounds read in checkNormalize
URL: https://github.com/apache/tomcat/pull/176#discussion_r299276651
 
 

 ##########
 File path: java/org/apache/catalina/connector/CoyoteAdapter.java
 ##########
 @@ -1271,6 +1276,11 @@ public static boolean checkNormalize(MessageBytes 
uriMB) {
             }
         }
 
+        // The URL must start with '/'
+        if (c[start] != '/') {
+            return false;
+        }
+
         // Check for ending with "/." or "/.."
 
 Review comment:
   I do have an input that triggers a 500 response if that check is removed:
   ```
   00000000: 202e 2e20 3020 0a                         .. 0 .
   ```
   
   That input trigger the exception that's in the PR description.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to