File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/security/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,18 +67,15 @@ module ExceptionXss {
6767 */
6868 class Callback extends DataFlow:: FunctionNode {
6969 DataFlow:: ParameterNode errorParameter ;
70- IfStmt ifStmt ;
7170
7271 Callback ( ) {
7372 exists ( DataFlow:: CallNode call | call .getLastArgument ( ) .getAFunctionValue ( ) = this ) and
7473 this .getNumParameter ( ) = 2 and
7574 errorParameter = this .getParameter ( 0 ) and
76- ifStmt = this .getFunction ( ) .getBodyStmt ( 0 ) and
77- errorParameter .flowsToExpr ( ifStmt .getCondition ( ) ) and
78- not ifStmt .getThen ( ) .getBasicBlock ( ) .getASuccessor * ( ) = this
79- .getFunction ( )
80- .getBodyStmt ( 1 )
81- .getBasicBlock ( )
75+ exists ( IfStmt ifStmt |
76+ ifStmt = this .getFunction ( ) .getBodyStmt ( 0 ) and
77+ errorParameter .flowsToExpr ( ifStmt .getCondition ( ) )
78+ )
8279 }
8380
8481 DataFlow:: Node getErrorParam ( ) { result = errorParameter }
You can’t perform that action at this time.
0 commit comments