File tree Expand file tree Collapse file tree
python/ql/src/semmle/python/web/twisted Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,18 +35,16 @@ predicate isTwistedRequestInstance(NameNode node) {
3535 * class, and the appropriate arguments of known request handler methods.
3636 */
3737
38- exists ( Function func | func = node .getScope ( ) |
38+ exists ( Function func |
39+ func = node .getScope ( ) and
3940 func .getEnclosingScope ( ) = aTwistedRequestHandlerClass ( ) .getScope ( )
40- ) and
41- (
41+ |
4242 /* Any parameter called `request` */
4343 node .getId ( ) = "request" and
4444 node .isParameter ( )
4545 or
4646 /* Any request parameter of a known request handler method */
47- exists ( Function func | node .getScope ( ) = func |
48- isKnownRequestHandlerMethodName ( func .getName ( ) ) and
49- node .getNode ( ) = func .getArg ( 1 )
50- )
47+ isKnownRequestHandlerMethodName ( func .getName ( ) ) and
48+ node .getNode ( ) = func .getArg ( 1 )
5149 )
5250}
You can’t perform that action at this time.
0 commit comments