@@ -24,19 +24,7 @@ func fasthttpClient() {
2424 fasthttp .DialTimeout (userInput , 5 ) // $ SsrfSink=userInput
2525 fasthttp .DialDualStackTimeout (userInput , 5 ) // $ SsrfSink=userInput
2626
27- res := & fasthttp.Response {}
28- req1 := & fasthttp.Request {}
29- req1 .SetHost (source ().(string ))
30- sink (req1 ) // $ hasTaintFlow="req1"
31- req2 := & fasthttp.Request {}
32- req2 .SetHostBytes (source ().([]byte ))
33- sink (req2 ) // $ hasTaintFlow="req2"
34- req3 := & fasthttp.Request {}
35- req3 .SetRequestURI (source ().(string ))
36- sink (req3 ) // $ hasTaintFlow="req3"
37- req4 := & fasthttp.Request {}
38- req4 .SetRequestURIBytes (source ().([]byte ))
39- sink (req4 ) // $ hasTaintFlow="req4"
27+ req := & fasthttp.Request {}
4028
4129 uri1 := fasthttp .AcquireURI ()
4230 userInput = "UserControlled.com:80"
@@ -55,20 +43,19 @@ func fasthttpClient() {
5543 uri5 := fasthttp .AcquireURI ()
5644 uri5 .Parse (source ().([]byte ), source ().([]byte ))
5745 sink (uri5 ) // $ hasTaintFlow="uri5"
58- req := & fasthttp.Request {}
59- uri6 := fasthttp .AcquireURI ()
60- req .SetURI (uri6 )
6146
6247 resByte := make ([]byte , 1000 )
6348 userInput = "http://127.0.0.1:8909"
49+ userInputBytes := []byte ("http://127.0.0.1:8909" )
50+ req .SetURI (uri5 ) // $ SsrfSink=uri5
51+ req .SetHost (userInput ) // $ SsrfSink=userInput
52+ req .SetHostBytes (userInputBytes ) // $ SsrfSink=userInputBytes
53+ req .SetRequestURI (userInput ) // $ SsrfSink=userInput
54+ req .SetRequestURIBytes (userInputBytes ) // $ SsrfSink=userInputBytes
6455 fasthttp .Get (resByte , userInput ) // $ SsrfSink=userInput
6556 fasthttp .GetDeadline (resByte , userInput , time.Time {}) // $ SsrfSink=userInput
6657 fasthttp .GetTimeout (resByte , userInput , 5 ) // $ SsrfSink=userInput
6758 fasthttp .Post (resByte , userInput , nil ) // $ SsrfSink=userInput
68- fasthttp .Do (req , res ) // $ SsrfSink=req
69- fasthttp .DoRedirects (req , res , 2 ) // $ SsrfSink=req
70- fasthttp .DoDeadline (req , res , time.Time {}) // $ SsrfSink=req
71- fasthttp .DoTimeout (req , res , 5 ) // $ SsrfSink=req
7259
7360 hostClient := & fasthttp.HostClient {
7461 Addr : "localhost:8080" ,
@@ -77,31 +64,15 @@ func fasthttpClient() {
7764 hostClient .GetDeadline (resByte , userInput , time.Time {}) // $ SsrfSink=userInput
7865 hostClient .GetTimeout (resByte , userInput , 5 ) // $ SsrfSink=userInput
7966 hostClient .Post (resByte , userInput , nil ) // $ SsrfSink=userInput
80- hostClient .Do (req , res ) // $ SsrfSink=req
81- hostClient .DoDeadline (req , res , time.Time {}) // $ SsrfSink=req
82- hostClient .DoRedirects (req , res , 2 ) // $ SsrfSink=req
83- hostClient .DoTimeout (req , res , 5 ) // $ SsrfSink=req
8467
8568 var lbclient fasthttp.LBClient
8669 lbclient .Clients = append (lbclient .Clients , hostClient )
87- lbclient .Do (req , res ) // $ SsrfSink=req
88- lbclient .DoDeadline (req , res , time.Time {}) // $ SsrfSink=req
89- lbclient .DoTimeout (req , res , 5 ) // $ SsrfSink=req
9070
9171 client := fasthttp.Client {}
9272 client .Get (resByte , userInput ) // $ SsrfSink=userInput
9373 client .GetDeadline (resByte , userInput , time.Time {}) // $ SsrfSink=userInput
9474 client .GetTimeout (resByte , userInput , 5 ) // $ SsrfSink=userInput
9575 client .Post (resByte , userInput , nil ) // $ SsrfSink=userInput
96- client .Do (req , res ) // $ SsrfSink=req
97- client .DoDeadline (req , res , time.Time {}) // $ SsrfSink=req
98- client .DoRedirects (req , res , 2 ) // $ SsrfSink=req
99- client .DoTimeout (req , res , 5 ) // $ SsrfSink=req
100-
101- pipelineClient := fasthttp.PipelineClient {}
102- pipelineClient .Do (req , res ) // $ SsrfSink=req
103- pipelineClient .DoDeadline (req , res , time.Time {}) // $ SsrfSink=req
104- pipelineClient .DoTimeout (req , res , 5 ) // $ SsrfSink=req
10576
10677 tcpDialer := fasthttp.TCPDialer {}
10778 userInput = "127.0.0.1:8909"
0 commit comments