]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: h2: do not accept SETTINGS_ENABLE_PUSH other than 0 or 1
authorWilly Tarreau <w@1wt.eu>
Sun, 3 Dec 2017 18:02:28 +0000 (19:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Dec 2017 20:08:42 +0000 (21:08 +0100)
We don't use yet it but for correctness, let's enforce the check.

To backport to 1.8.

src/mux_h2.c

index 28c5eb7060aa4dbc7b0e313fdaf95ccc6a266cef..771a3e6022f4061756a87ae5b90f392b5ed0ec6b 100644 (file)
@@ -1102,6 +1102,12 @@ static int h2c_handle_settings(struct h2c *h2c)
                        }
                        h2c->mfs = arg;
                        break;
+               case H2_SETTINGS_ENABLE_PUSH:
+                       if (arg < 0 || arg > 1) { // RFC7540#6.5.2
+                               error = H2_ERR_PROTOCOL_ERROR;
+                               goto fail;
+                       }
+                       break;
                }
        }