This is explicitly forbidden by 7540#8.1.2, and may be used to bypass
some of the other filters, so they must be blocked early. It removes
another issue reported by h2spec.
To backport to 1.8.
int ck, lck; /* cookie index and last cookie index */
int phdr;
int ret;
+ int i;
lck = ck = -1; // no cookie for now
fields = 0;
}
else {
/* this can be any type of header */
+ /* RFC7540#8.1.2: upper case not allowed in header field names */
+ for (i = 0; i < list[idx].n.len; i++)
+ if ((uint8_t)(list[idx].n.ptr[i] - 'A') < 'Z' - 'A')
+ goto fail;
+
phdr = h2_str_to_phdr(list[idx].n);
}