diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-04-29 08:00:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-04-29 08:02:44 +0200 |
commit | 5fc28510a4664f46459d9a40187d81cc08571e60 (patch) | |
tree | b6d15dac4952967aecf54af92f5a0f5ca10fcb66 /tests/data/test1559 | |
parent | 2fe2da9f1a6b059f94c28e963032539790dbcae5 (diff) |
CURL_MAX_INPUT_LENGTH: largest acceptable string input size
This limits all accepted input strings passed to libcurl to be less than
CURL_MAX_INPUT_LENGTH (8000000) bytes, for these API calls:
curl_easy_setopt() and curl_url_set().
The 8000000 number is arbitrary picked and is meant to detect mistakes
or abuse, not to limit actual practical use cases. By limiting the
acceptable string lengths we also reduce the risk of integer overflows
all over.
NOTE: This does not apply to `CURLOPT_POSTFIELDS`.
Test 1559 verifies.
Closes #3805
Diffstat (limited to 'tests/data/test1559')
-rw-r--r-- | tests/data/test1559 | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/data/test1559 b/tests/data/test1559 new file mode 100644 index 000000000..cbed6fbcc --- /dev/null +++ b/tests/data/test1559 @@ -0,0 +1,44 @@ +<testcase> +<info> +<keywords> +CURLOPT_URL +</keywords> +</info> + +<reply> +</reply> + +<client> +<server> +none +</server> + +# require HTTP so that CURLOPT_POSTFIELDS works as assumed +<features> +http +</features> +<tool> +lib1559 +</tool> + +<name> +Set excessive URL lengths +</name> +</client> + +# +# Verify that the test runs to completion without crashing +<verify> +<errorcode> +0 +</errorcode> +<stdout> +CURLOPT_URL 10000000 bytes URL == 43 +CURLOPT_POSTFIELDS 10000000 bytes data == 0 +CURLUPART_URL 10000000 bytes URL == 3 +CURLUPART_SCHEME 10000000 bytes scheme == 3 +CURLUPART_USER 10000000 bytes user == 3 +</stdout> +</verify> + +</testcase> |