tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1622304 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/http/parser/HttpParser.java
Date Wed, 03 Sep 2014 17:48:30 GMT
Author: markt
Date: Wed Sep  3 17:48:29 2014
New Revision: 1622304

URL: http://svn.apache.org/r1622304
Log:
Fix parsing bug when quality ends in invalid character(s)

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1618259

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java?rev=1622304&r1=1622303&r2=1622304&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java Wed Sep 
3 17:48:29 2014
@@ -534,8 +534,9 @@ public class HttpParser {
                 } else if (c == delimiter || c == 9 || c == 32 || c == -1) {
                     break;
                 } else {
-                    // Go back so character is available for next read
-                    input.skip(-1);
+                    // Malformed. Use quality of zero so it is dropped and skip until
+                    // EOF or the next delimiter
+                    skipUntil(input, c, delimiter);
                     return 0;
                 }
             }



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


Mime
View raw message