mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
deps,http: http_parser set max header size to 8KB
CVE-2018-12121 PR-URL: https://github.com/nodejs-private/node-private/pull/143 Ref: https://github.com/nodejs-private/security/issues/139 Ref: https://github.com/nodejs-private/http-parser-private/pull/2 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
38ca8baf81
commit
a8532d4d23
5 files changed
+166
-11
No files matched your search
@@ -17,14 +17,14 @@ let requests = 0;
|
||||
let responses = 0;
|
||||
|
||||
const headers = {};
|
||||
const N = 2000;
|
||||
const N = 100;
|
||||
for (let i = 0; i < N; ++i) {
|
||||
headers[`key${i}`] = i;
|
||||
}
|
||||
|
||||
const maxAndExpected = [ // for server
|
||||
[50, 50],
|
||||
[1500, 1500],
|
||||
[1500, 102],
|
||||
[0, N + 2] // Host and Connection
|
||||
];
|
||||
let max = maxAndExpected[requests][0];
|
||||
@@ -45,7 +45,7 @@ server.maxHeadersCount = max;
|
||||
server.listen(0, common.mustCall(() => {
|
||||
const maxAndExpected = [ // for client
|
||||
[20, 20],
|
||||
[1200, 1200],
|
||||
[1200, 103],
|
||||
[0, N + 3] // Connection, Date and Transfer-Encoding
|
||||
];
|
||||
const doRequest = common.mustCall(() => {
|
||||
|
||||
Reference in new issue
Block a user