mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
fix Content-Encoding: x-gzip
RFC 7230 section 4.2.3 states that: "A recipient SHOULD consider 'x-gzip' to be equivalent to 'gzip'" This could lead to evasions as an attacker could use: Content-Encoding: x-gzip To bypass Bro's decompression.
This commit is contained in:
parent
bb20026267
commit
2a01c70837
1 changed files with 2 additions and 1 deletions
|
@ -451,7 +451,8 @@ void HTTP_Entity::SubmitHeader(mime::MIME_Header* h)
|
|||
else if ( mime::strcasecmp_n(h->get_name(), "content-encoding") == 0 )
|
||||
{
|
||||
data_chunk_t vt = h->get_value_token();
|
||||
if ( mime::strcasecmp_n(vt, "gzip") == 0 )
|
||||
if ( mime::strcasecmp_n(vt, "gzip") == 0 ||
|
||||
mime::strcasecmp_n(vt, "x-gzip") == 0 )
|
||||
encoding = GZIP;
|
||||
if ( mime::strcasecmp_n(vt, "deflate") == 0 )
|
||||
encoding = DEFLATE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue