Skip to content

Commit f339274

Browse files
committed
Adapt test to work better for MaD
In MaD, `Argument[n]` corresponds to the post-update node of the argument, which in the old version of the test will be the definition of `dstReader` for the tests for `ReadBody`, `ReadLimitBody`, `ContinueReadBodyStream`, `ContinueReadBody`.
1 parent a8a4a20 commit f339274

File tree

1 file changed

+4
-4
lines changed
  • go/ql/test/library-tests/semmle/go/frameworks/Fasthttp

1 file changed

+4
-4
lines changed

go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/fasthttp.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ func fasthttpServer() {
169169
fmt.Println(body1, body2, body3, body4)
170170
requestCtx.Request.BodyStream() // $ RemoteFlowSource="call to BodyStream"
171171

172-
requestCtx.Request.ReadBody(dstReader, 100, 1000) // $ RemoteFlowSource="dstReader"
173-
requestCtx.Request.ReadLimitBody(dstReader, 100) // $ RemoteFlowSource="dstReader"
174-
requestCtx.Request.ContinueReadBodyStream(dstReader, 100, true) // $ RemoteFlowSource="dstReader"
175-
requestCtx.Request.ContinueReadBody(dstReader, 100) // $ RemoteFlowSource="dstReader"
172+
requestCtx.Request.ReadBody(&bufio.Reader{}, 100, 1000) // $ RemoteFlowSource="&..."
173+
requestCtx.Request.ReadLimitBody(&bufio.Reader{}, 100) // $ RemoteFlowSource="&..."
174+
requestCtx.Request.ContinueReadBodyStream(&bufio.Reader{}, 100, true) // $ RemoteFlowSource="&..."
175+
requestCtx.Request.ContinueReadBody(&bufio.Reader{}, 100) // $ RemoteFlowSource="&..."
176176

177177
// Response methods
178178
// Xss Sinks Related method

0 commit comments

Comments
 (0)