mirror of
https://github.com/github/codeql.git
synced 2026-05-11 09:49:26 +02:00
JS: model Koa redirects
This commit is contained in:
@@ -291,4 +291,20 @@ module Koa {
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
/**
|
||||
* An invocation of the `redirect` method of an HTTP response object.
|
||||
*/
|
||||
private class RedirectInvocation extends HTTP::RedirectInvocation, MethodCallExpr {
|
||||
RouteHandler rh;
|
||||
|
||||
RedirectInvocation() {
|
||||
this.(MethodCallExpr).calls(rh.getAResponseOrContextExpr(), "redirect")
|
||||
}
|
||||
|
||||
override Expr getUrlArgument() { result = getArgument(0) }
|
||||
|
||||
override RouteHandler getRouteHandler() { result = rh }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user