mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
hsts: accept 10K entries in the list
Up from 1K.
Reduces the risk that someone could flush the list by tricking a user to
do many transfers to new hostnames.
Document the limit.
Follow-up to 03a792b186
Closes #21200
This commit is contained in:
parent
d888a53e14
commit
93e80c75b4
6 changed files with 27 additions and 12 deletions
|
|
@ -18,7 +18,7 @@ HSTS
|
|||
CURL_TIME=1548369261
|
||||
</setenv>
|
||||
<name>
|
||||
HSTS load more than 1,000 entries from file
|
||||
HSTS load more than 10k entries from file
|
||||
</name>
|
||||
|
||||
# test 1674 renders the input file itself, then reads it
|
||||
|
|
@ -29,10 +29,10 @@ HSTS load more than 1,000 entries from file
|
|||
|
||||
<verify>
|
||||
<stdout>
|
||||
Number of entries: 1000
|
||||
OK
|
||||
</stdout>
|
||||
<limits>
|
||||
Allocations: 1100
|
||||
Allocations: 11000
|
||||
</limits>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,10 @@ static CURLcode test_unit1674(const char *arg)
|
|||
|
||||
Curl_hsts_loadfile(easy, h, arg);
|
||||
|
||||
curl_mprintf("Number of entries: %zu\n", Curl_llist_count(&h->list));
|
||||
if(Curl_llist_count(&h->list) == MAX_HSTS_ENTRIES)
|
||||
curl_mprintf("OK\n");
|
||||
else
|
||||
curl_mprintf("Number of entries: %zu\n", Curl_llist_count(&h->list));
|
||||
|
||||
curl_msnprintf(savename, sizeof(savename), "%s.save", arg);
|
||||
(void)Curl_hsts_save(easy, h, savename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue