mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
rename 'getThrowsToNode' to 'getExceptionalNode'
This commit is contained in:
@@ -250,7 +250,7 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
|
|||||||
* Gets the data-flow node where exceptional data-flow will flow if this expression
|
* Gets the data-flow node where exceptional data-flow will flow if this expression
|
||||||
* causes an exception to be thrown.
|
* causes an exception to be thrown.
|
||||||
*/
|
*/
|
||||||
DataFlow::Node getThrowsToNode() {
|
DataFlow::Node getExceptionalNode() {
|
||||||
if exists(this.getEnclosingStmt().getEnclosingTryCatchStmt())
|
if exists(this.getEnclosingStmt().getEnclosingTryCatchStmt())
|
||||||
then
|
then
|
||||||
result = DataFlow::parameterNode(this
|
result = DataFlow::parameterNode(this
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ predicate localExceptionStep(DataFlow::Node pred, DataFlow::Node succ) {
|
|||||||
or
|
or
|
||||||
DataFlow::exceptionalInvocationReturnNode(pred, expr)
|
DataFlow::exceptionalInvocationReturnNode(pred, expr)
|
||||||
|
|
|
|
||||||
succ = expr.getThrowsToNode()
|
succ = expr.getExceptionalNode()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ module ExceptionXss {
|
|||||||
DataFlow::FlowLabel outlbl
|
DataFlow::FlowLabel outlbl
|
||||||
) {
|
) {
|
||||||
inlbl instanceof NotYetThrown and (outlbl.isTaint() or outlbl instanceof NotYetThrown) and
|
inlbl instanceof NotYetThrown and (outlbl.isTaint() or outlbl instanceof NotYetThrown) and
|
||||||
succ = pred.asExpr().getThrowsToNode() and
|
succ = pred.asExpr().getExceptionalNode() and
|
||||||
canThrowSensitiveInformation(pred)
|
canThrowSensitiveInformation(pred)
|
||||||
or
|
or
|
||||||
// All the usual taint-flow steps apply on data-flow before it has been thrown in an exception.
|
// All the usual taint-flow steps apply on data-flow before it has been thrown in an exception.
|
||||||
|
|||||||
Reference in New Issue
Block a user