mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
http,https: protect against slow headers attack
CVE-2018-12122 An attacker can send a char/s within headers and exahust the resources (file descriptors) of a system even with a tight max header length protection. This PR destroys a socket if it has not received the headers in 40s. PR-URL: https://github.com/nodejs-private/node-private/pull/152 Ref: https://github.com/nodejs-private/node-private/pull/144 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
92231a56d9
commit
618eebdd17
7 files changed
+197
-12
No files matched your search
@@ -37,6 +37,8 @@ function Server(opts, requestListener) {
|
||||
});
|
||||
|
||||
this.timeout = 2 * 60 * 1000;
|
||||
|
||||
this.headersTimeout = 40 * 1000; // 40 seconds
|
||||
}
|
||||
inherits(Server, tls.Server);
|
||||
exports.Server = Server;
|
||||
|
||||
Reference in new issue
Block a user