mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
changes based on review feedback
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user