tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1618259 - /tomcat/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java
Date Fri, 15 Aug 2014 19:09:39 GMT
Author: markt
Date: Fri Aug 15 19:09:39 2014
New Revision: 1618259

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

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java?rev=1618259&r1=1618258&r2=1618259&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java Fri Aug 15 19:09:39
2014
@@ -363,8 +363,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