You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/02 16:28:11 UTC

[tomcat] branch master updated (d1f5800 -> c4136df)

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

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


    from d1f5800  Improve parsing of Content-Range headers
     new 7836d43  Fix format
     new c4136df  Once a URI is identified as invalid don't attempt to process it further.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/catalina/connector/CoyoteAdapter.java | 15 ++++++++-------
 webapps/docs/changelog.xml                            |  7 ++++++-
 2 files changed, 14 insertions(+), 8 deletions(-)


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


[tomcat] 01/02: Fix format

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7836d4369c7f327341d957d78348fc20bd7f509c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 2 17:25:18 2019 +0100

    Fix format
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e8a582c..4764c97 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -81,7 +81,8 @@
         <bug>63523</bug>: Restore SSLUtilBase methods as protected to preserve
         compatibility. (remm)
       </fix>
-      <fix>Fix typo in UTF-32LE charset name. Patch by zhanhb vi Github.
+      <fix>
+        Fix typo in UTF-32LE charset name. Patch by zhanhb vi Github.
         (fschumacher)
       </fix>
     </changelog>


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


[tomcat] 02/02: Once a URI is identified as invalid don't attempt to process it further.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c4136dfe2b71dc58b120591857ff21beee7e9c10
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 2 17:27:20 2019 +0100

    Once a URI is identified as invalid don't attempt to process it further.
    
    Based on a PR by Alex Repert.
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 15 ++++++++-------
 webapps/docs/changelog.xml                            |  4 ++++
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java
index c996803..3c28c13 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -637,13 +637,14 @@ public class CoyoteAdapter implements Adapter {
                 response.sendError(400, "Invalid URI: " + ioe.getMessage());
             }
             // Normalization
-            if (!normalize(req.decodedURI())) {
-                response.sendError(400, "Invalid URI");
-            }
-            // Character decoding
-            convertURI(decodedURI, request);
-            // Check that the URI is still normalized
-            if (!checkNormalize(req.decodedURI())) {
+            if (normalize(req.decodedURI())) {
+                // Character decoding
+                convertURI(decodedURI, request);
+                // Check that the URI is still normalized
+                if (!checkNormalize(req.decodedURI())) {
+                    response.sendError(400, "Invalid URI");
+                }
+            } else {
                 response.sendError(400, "Invalid URI");
             }
         } else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4764c97..bcce219 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -85,6 +85,10 @@
         Fix typo in UTF-32LE charset name. Patch by zhanhb vi Github.
         (fschumacher)
       </fix>
+      <fix>
+        Once a URI is identified as invalid don't attempt to process it further.
+        Based on a PR by Alex Repert. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


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