File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ const OutgoingMessage = require('_http_outgoing').OutgoingMessage;
14
14
const Agent = require ( '_http_agent' ) ;
15
15
const Buffer = require ( 'buffer' ) . Buffer ;
16
16
17
+ const REVERT_CVE_2018_12116 = process . REVERT_CVE_2018_12116 ;
18
+
17
19
const INVALID_PATH_REGEX = / [ ^ \u0021 - \u00ff ] / ;
18
20
19
21
function ClientRequest ( options , cb ) {
@@ -47,7 +49,14 @@ function ClientRequest(options, cb) {
47
49
var path ;
48
50
if ( options . path ) {
49
51
path = String ( options . path ) ;
50
- if ( INVALID_PATH_REGEX . test ( path ) )
52
+ var invalidPath ;
53
+ if ( REVERT_CVE_2018_12116 ) {
54
+ invalidPath = / [ \u0000 - \u0020 ] / . test ( path ) ;
55
+ } else {
56
+ invalidPath = INVALID_PATH_REGEX . test ( path ) ;
57
+ }
58
+
59
+ if ( invalidPath )
51
60
throw new TypeError ( 'Request path contains unescaped characters' ) ;
52
61
}
53
62
Original file line number Diff line number Diff line change 15
15
**/
16
16
namespace node {
17
17
18
- #define SECURITY_REVERSIONS (XX )
19
- // XX(CVE_2016_PEND , "CVE-2016-PEND ", "Vulnerability Title ")
18
+ #define SECURITY_REVERSIONS (XX ) \
19
+ XX (CVE_2018_12116 , " CVE-2018-12116 " , " HTTP request splitting " )
20
20
21
21
enum reversion {
22
22
#define V (code, ...) SECURITY_REVERT_##code,
You can’t perform that action at this time.
0 commit comments