rename getExceptionalNode to getExceptionTarget

This commit is contained in:
Erik Krogh Kristensen
2019-11-19 15:32:17 +01:00
parent d8a5554666
commit c2b48eb546
3 changed files with 4 additions and 3 deletions

View File

@@ -250,7 +250,7 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
* Gets the data-flow node where exceptions thrown by this expression will
* propagate if this expression causes an exception to be thrown.
*/
DataFlow::Node getExceptionalNode() {
DataFlow::Node getExceptionTarget() {
if exists(this.getEnclosingStmt().getEnclosingTryCatchStmt())
then
result = DataFlow::parameterNode(this

View File

@@ -66,7 +66,8 @@ predicate localExceptionStep(DataFlow::Node pred, DataFlow::Node succ) {
or
DataFlow::exceptionalInvocationReturnNode(pred, expr)
|
succ = expr.getExceptionalNode()
succ = expr.getExceptionTarget
()
)
}

View File

@@ -73,7 +73,7 @@ module ExceptionXss {
DataFlow::FlowLabel outlbl
) {
inlbl instanceof NotYetThrown and (outlbl.isTaint() or outlbl instanceof NotYetThrown) and
succ = pred.asExpr().getExceptionalNode() and
succ = pred.asExpr().getExceptionTarget() and
canThrowSensitiveInformation(pred)
or
// All the usual taint-flow steps apply on data-flow before it has been thrown in an exception.