mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -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/150 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
a8532d4d23
commit
eb43bc04b1
8 files changed
+184
-12
No files matched your search
@@ -43,6 +43,12 @@ This method is identical to [`server.listen()`][] from [`net.Server`][].
|
||||
|
||||
See [`http.Server#maxHeadersCount`][].
|
||||
|
||||
### server.headersTimeout
|
||||
|
||||
- {number} **Default:** `40000`
|
||||
|
||||
See [`http.Server#headersTimeout`][].
|
||||
|
||||
### server.setTimeout([msecs][, callback])
|
||||
<!-- YAML
|
||||
added: v0.11.2
|
||||
@@ -360,6 +366,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
|
||||
[`http.Agent`]: http.html#http_class_http_agent
|
||||
[`http.Server#keepAliveTimeout`]: http.html#http_server_keepalivetimeout
|
||||
[`http.Server#maxHeadersCount`]: http.html#http_server_maxheaderscount
|
||||
[`http.Server#headersTimeout`]: http.html#http_server_headerstimeout
|
||||
[`http.Server#setTimeout()`]: http.html#http_server_settimeout_msecs_callback
|
||||
[`http.Server#timeout`]: http.html#http_server_timeout
|
||||
[`http.Server`]: http.html#http_class_http_server
|
||||
|
||||
Reference in new issue
Block a user