changes based on review feedback

This commit is contained in:
Erik Krogh Kristensen
2019-12-17 13:17:53 +01:00
parent f9ddd5891a
commit 9dd7d1c6d7
2 changed files with 3 additions and 7 deletions

View File

@@ -212,10 +212,6 @@ private class PromiseFlowStep extends DataFlow::AdditionalFlowStep {
/** /**
* A data flow edge from the exceptional return of the promise executor to the promise catch handler. * A data flow edge from the exceptional return of the promise executor to the promise catch handler.
* This only adds an edge from the exceptional return of the promise executor to a `.catch()` handler. * This only adds an edge from the exceptional return of the promise executor to a `.catch()` handler.
* Missing are (at least):
* Exceptional flow from promise executor (and handlers) to exceptional return of an `await` expression.
* Flow from calls to `reject` to exceptional return of an `await` expression.
* Restricting flow to only the first catch handler after an exception.
*/ */
private class PromiseExceptionalStep extends DataFlow::AdditionalFlowStep { private class PromiseExceptionalStep extends DataFlow::AdditionalFlowStep {
PromiseDefinition promise; PromiseDefinition promise;

View File

@@ -46,7 +46,7 @@ module ExceptionXss {
or or
exists(DataFlow::PropRef prop | exists(DataFlow::PropRef prop |
node = DataFlow::valueNode(prop.getPropertyNameExpr()) and node = DataFlow::valueNode(prop.getPropertyNameExpr()) and
isNullOrUndefined(prop.getBase().analyze().getAType()) forex(InferredType t | t = prop.getBase().analyze().getAType() | isNullOrUndefined(t))
) )
) )
} }
@@ -99,8 +99,8 @@ module ExceptionXss {
} }
/** /**
* Gets the data-flow node where exceptions thrown by this expression will * Gets the data-flow node to which any exceptions thrown by
* propagate if this expression causes an exception to be thrown. * this expression will propagate.
* This predicate adds, on top of `Expr::getExceptionTarget`, exceptions * This predicate adds, on top of `Expr::getExceptionTarget`, exceptions
* propagated by callbacks. * propagated by callbacks.
*/ */