HTTP parser: restricting control chars in header fields values.
This also fixes an infinite loop here (found with honggfuzz).
This commit is contained in:
@@ -650,10 +650,8 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ch == '\0') {
|
|
||||||
return NXT_HTTP_PARSE_INVALID;
|
return NXT_HTTP_PARSE_INVALID;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (nxt_fast_path(p != *pos)) {
|
if (nxt_fast_path(p != *pos)) {
|
||||||
while (p[-1] == ' ') {
|
while (p[-1] == ' ') {
|
||||||
|
|||||||
Reference in New Issue
Block a user