File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -677,7 +677,6 @@ tap.test('headers that might cause a ReDoS', (t) => {
677
677
t . end ( )
678
678
} )
679
679
680
-
681
680
tap . test ( 'Headers.prototype.getSetCookie' , ( t ) => {
682
681
t . test ( 'Mutating the returned list does not affect the set-cookie list' , ( t ) => {
683
682
const h = new Headers ( [
@@ -694,4 +693,4 @@ tap.test('Headers.prototype.getSetCookie', (t) => {
694
693
} )
695
694
696
695
t . end ( )
697
- } )
696
+ } )
Original file line number Diff line number Diff line change 3
3
const { test } = require ( 'tap' )
4
4
const { Client } = require ( '..' )
5
5
const { createServer } = require ( 'http' )
6
- const EE = require ( 'events' )
7
6
8
7
test ( 'CRLF Injection in Nodejs ‘undici’ via host' , ( t ) => {
9
8
t . plan ( 1 )
@@ -17,15 +16,15 @@ test('CRLF Injection in Nodejs ‘undici’ via host', (t) => {
17
16
const client = new Client ( `http://localhost:${ server . address ( ) . port } ` )
18
17
t . teardown ( client . close . bind ( client ) )
19
18
20
- const unsanitizedContentTypeInput = '12 \r\n\r\naaa:aaa'
19
+ const unsanitizedContentTypeInput = '12 \r\n\r\naaa:aaa'
21
20
22
21
try {
23
22
const { body } = await client . request ( {
24
23
path : '/' ,
25
24
method : 'POST' ,
26
25
headers : {
27
26
'content-type' : 'application/json' ,
28
- ' host' : unsanitizedContentTypeInput
27
+ host : unsanitizedContentTypeInput
29
28
} ,
30
29
body : 'asd'
31
30
} )
You can’t perform that action at this time.
0 commit comments