mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Handle Zstandard and LZMA in our check for correct guessed compression.
See: https://bugs.torproject.org/21667
This commit is contained in:
parent
fbef257c43
commit
61b6de5906
@ -2309,6 +2309,10 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
|
|||||||
description1 = "as deflated";
|
description1 = "as deflated";
|
||||||
else if (compression == GZIP_METHOD)
|
else if (compression == GZIP_METHOD)
|
||||||
description1 = "as gzipped";
|
description1 = "as gzipped";
|
||||||
|
else if (compression == ZSTD_METHOD)
|
||||||
|
description1 = "as Zstandard compressed";
|
||||||
|
else if (compression == LZMA_METHOD)
|
||||||
|
description1 = "as LZMA compressed";
|
||||||
else if (compression == NO_METHOD)
|
else if (compression == NO_METHOD)
|
||||||
description1 = "as uncompressed";
|
description1 = "as uncompressed";
|
||||||
else
|
else
|
||||||
@ -2317,6 +2321,10 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
|
|||||||
description2 = "deflated";
|
description2 = "deflated";
|
||||||
else if (guessed == GZIP_METHOD)
|
else if (guessed == GZIP_METHOD)
|
||||||
description2 = "gzipped";
|
description2 = "gzipped";
|
||||||
|
else if (guessed == ZSTD_METHOD)
|
||||||
|
description2 = "Zstandard compressed";
|
||||||
|
else if (guessed == LZMA_METHOD)
|
||||||
|
description2 = "LZMA compressed";
|
||||||
else if (!plausible)
|
else if (!plausible)
|
||||||
description2 = "confusing binary junk";
|
description2 = "confusing binary junk";
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user