mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Fix, prevent addHook return values from being treated as XSS sinks
This commit is contained in:
@@ -328,7 +328,11 @@ module Fastify {
|
||||
ResponseSendArgument() {
|
||||
this = rh.getAResponseSource().ref().getAMethodCall("send").getArgument(0)
|
||||
or
|
||||
this = rh.(DataFlow::FunctionNode).getAReturn()
|
||||
exists(RouteSetup setup |
|
||||
rh = setup.getARouteHandler() and
|
||||
this = rh.(DataFlow::FunctionNode).getAReturn() and
|
||||
setup.getMethodName() != "addHook"
|
||||
)
|
||||
}
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
|
||||
Reference in New Issue
Block a user