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/24 13:22:40 UTC

[tomcat] branch master updated (a403dda -> ca871df)

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 a403dda  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578
     new 2ead380  Correct key order (should be alphabetical)
     new ca871df  Fix h2spec test suite failure. EOS in Huffman encoded string literal.

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/coyote/http2/HPackHuffman.java       | 5 +++++
 java/org/apache/coyote/http2/LocalStrings.properties | 5 +++--
 webapps/docs/changelog.xml                           | 4 ++++
 3 files changed, 12 insertions(+), 2 deletions(-)


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


[tomcat] 01/02: Correct key order (should be alphabetical)

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 2ead3806ad5568e7a2beb126b4ba700755469f07
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 24 13:56:13 2019 +0100

    Correct key order (should be alphabetical)
---
 java/org/apache/coyote/http2/LocalStrings.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties
index 8805e98..498a217 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -159,11 +159,11 @@ upgradeHandler.writeHeaders=Connection [{0}], Stream [{1}]
 upgradeHandler.writePushHeaders=Connection [{0}], Stream [{1}], Pushed stream [{2}], EndOfStream [{3}]
 
 windowAllocationManager.dispatched=Connection [{0}], Stream [{1}], Dispatched
-windowAllocationManager.notify=Connection [{0}], Stream [{1}], Waiting type [{2}], Notify type [{3}]
 windowAllocationManager.notified=Connection [{0}], Stream [{1}], Notified
+windowAllocationManager.notify=Connection [{0}], Stream [{1}], Waiting type [{2}], Notify type [{3}]
 windowAllocationManager.waitFor.connection=Connection [{0}], Stream [{1}], Waiting for Connection flow control window (blocking) with timeout [{2}]
-windowAllocationManager.waitFor.stream=Connection [{0}], Stream [{1}], Waiting for Stream flow control window (blocking) with timeout [{2}]
 windowAllocationManager.waitFor.ise=Connection [{0}], Stream [{1}], Already waiting
+windowAllocationManager.waitFor.stream=Connection [{0}], Stream [{1}], Waiting for Stream flow control window (blocking) with timeout [{2}]
 windowAllocationManager.waitForNonBlocking.connection=Connection [{0}], Stream [{1}], Waiting for Connection flow control window (non-blocking)
 windowAllocationManager.waitForNonBlocking.stream=Connection [{0}], Stream [{1}], Waiting for Stream flow control window (non-blocking)
 


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


[tomcat] 02/02: Fix h2spec test suite failure. EOS in Huffman encoded string literal.

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 ca871dff3be73dd33437907b40049eea401b01ab
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 24 14:22:05 2019 +0100

    Fix h2spec test suite failure. EOS in Huffman encoded string literal.
    
    Patch by jfclere
---
 java/org/apache/coyote/http2/HPackHuffman.java       | 5 +++++
 java/org/apache/coyote/http2/LocalStrings.properties | 1 +
 webapps/docs/changelog.xml                           | 4 ++++
 3 files changed, 10 insertions(+)

diff --git a/java/org/apache/coyote/http2/HPackHuffman.java b/java/org/apache/coyote/http2/HPackHuffman.java
index 637e690..365a6f9 100644
--- a/java/org/apache/coyote/http2/HPackHuffman.java
+++ b/java/org/apache/coyote/http2/HPackHuffman.java
@@ -404,6 +404,11 @@ public class HPackHuffman {
                     if ((val & HIGH_TERMINAL_BIT) == 0) {
                         treePos = (val >> 16) & LOW_MASK;
                     } else {
+                        if (eosBitCount != 0) {
+                            // This must be the EOS symbol which MUST be treated
+                            // as an error
+                            throw new HpackException(sm.getString("hpackhuffman.stringLiteralEOS"));
+                        }
                         target.append((char) ((val >> 16) & LOW_MASK));
                         treePos = 0;
                         eosBits = true;
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties
index 498a217..83afc74 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -44,6 +44,7 @@ hpackdecoder.tableSizeUpdateNotAtStart=Any table size update must be sent at the
 hpackdecoder.zeroNotValidHeaderTableIndex=Zero is not a valid header table index
 
 hpackhuffman.huffmanEncodedHpackValueDidNotEndWithEOS=Huffman encoded value in HPACK headers did not end with EOS padding
+hpackhuffman.stringLiteralEOS=Huffman encoded value in HPACK headers contained the EOS symbol
 hpackhuffman.stringLiteralTooMuchPadding=More than 7 bits of EOS padding were provided at the end of an Huffman encoded string literal
 
 http2Parser.error=Connection [{0}], Stream [{1}], Frame type [{2}], Error
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b04ebcb..46c39fa 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -103,6 +103,10 @@
         <bug>63578</bug>: Improve handling of invalid requests so that 400
         responses are returned to the client rather than 500 responses. (markt)
       </fix>
+      <fix>
+        Fix h2spec test suite failure. It is an error if a Huffman encoded
+        string literal contains the EOS symbol. (jfclere)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">


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