BUG/MINOR: h2: do not accept SETTINGS_ENABLE_PUSH other than 0 or 1

We don't use yet it but for correctness, let's enforce the check.

To backport to 1.8.
This commit is contained in:
Willy Tarreau 2017-12-03 19:02:28 +01:00
parent 497456154e
commit 1b38b46ab7

View 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;
}
}