Skip to content

Commit 9dd7d1c

Browse files
committed
changes based on review feedback
1 parent f9ddd58 commit 9dd7d1c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

javascript/ql/src/semmle/javascript/StandardLibrary.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,6 @@ private class PromiseFlowStep extends DataFlow::AdditionalFlowStep {
212212
/**
213213
* A data flow edge from the exceptional return of the promise executor to the promise catch handler.
214214
* This only adds an edge from the exceptional return of the promise executor to a `.catch()` handler.
215-
* Missing are (at least):
216-
* Exceptional flow from promise executor (and handlers) to exceptional return of an `await` expression.
217-
* Flow from calls to `reject` to exceptional return of an `await` expression.
218-
* Restricting flow to only the first catch handler after an exception.
219215
*/
220216
private class PromiseExceptionalStep extends DataFlow::AdditionalFlowStep {
221217
PromiseDefinition promise;

javascript/ql/src/semmle/javascript/security/dataflow/ExceptionXss.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module ExceptionXss {
4646
or
4747
exists(DataFlow::PropRef prop |
4848
node = DataFlow::valueNode(prop.getPropertyNameExpr()) and
49-
isNullOrUndefined(prop.getBase().analyze().getAType())
49+
forex(InferredType t | t = prop.getBase().analyze().getAType() | isNullOrUndefined(t))
5050
)
5151
)
5252
}
@@ -99,8 +99,8 @@ module ExceptionXss {
9999
}
100100

101101
/**
102-
* Gets the data-flow node where exceptions thrown by this expression will
103-
* propagate if this expression causes an exception to be thrown.
102+
* Gets the data-flow node to which any exceptions thrown by
103+
* this expression will propagate.
104104
* This predicate adds, on top of `Expr::getExceptionTarget`, exceptions
105105
* propagated by callbacks.
106106
*/

0 commit comments

Comments
 (0)