mirror of
https://github.com/curl/curl.git
synced 2026-07-30 05:28:02 +03:00
progress: count amount of data "delivered" to application
... and apply the CURLOPT_MAXFILESIZE limit (if set) on that as well. This effectively protects the user against "zip bombs". Test case 1618 verifies using a 14 byte brotli payload that otherwise explodes to 102400 zero bytes. Closes #20787
This commit is contained in:
parent
fa13f373b2
commit
77ed315096
22 changed files with 218 additions and 11 deletions
|
|
@ -461,6 +461,8 @@ static const struct writeoutvar variables[] = {
|
|||
{ "remote_port", VAR_PRIMARY_PORT, CURLINFO_PRIMARY_PORT, writeLong },
|
||||
{ "response_code", VAR_HTTP_CODE, CURLINFO_RESPONSE_CODE, writeLong },
|
||||
{ "scheme", VAR_SCHEME, CURLINFO_SCHEME, writeString },
|
||||
{ "size_delivered", VAR_SIZE_DELIVERED, CURLINFO_SIZE_DELIVERED,
|
||||
writeOffset },
|
||||
{ "size_download", VAR_SIZE_DOWNLOAD, CURLINFO_SIZE_DOWNLOAD_T,
|
||||
writeOffset },
|
||||
{ "size_header", VAR_HEADER_SIZE, CURLINFO_HEADER_SIZE, writeLong },
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ typedef enum {
|
|||
VAR_REFERER,
|
||||
VAR_REQUEST_SIZE,
|
||||
VAR_SCHEME,
|
||||
VAR_SIZE_DELIVERED,
|
||||
VAR_SIZE_DOWNLOAD,
|
||||
VAR_SIZE_UPLOAD,
|
||||
VAR_SPEED_DOWNLOAD,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue