@@ -91,9 +91,9 @@ predicate allowCredentialsIsSetToTrue(AllowOriginHeaderWrite allowOriginHW) {
9191 * The `message` parameter is populated with the warning message to be returned by the query.
9292 */
9393predicate flowsFromUntrustedToAllowOrigin ( AllowOriginHeaderWrite allowOriginHW , string message ) {
94- exists ( FlowsUntrustedToAllowOriginHeader cfg , DataFlow:: PathNode source , DataFlow :: PathNode sink |
95- cfg .hasFlowPath ( source , sink ) and
96- cfg .isSink ( sink . getNode ( ) , allowOriginHW )
94+ exists ( FlowsUntrustedToAllowOriginHeader cfg , DataFlow:: Node sink |
95+ cfg .hasFlowTo ( sink ) and
96+ cfg .isSink ( sink , allowOriginHW )
9797 |
9898 message =
9999 headerAllowOrigin ( ) + " header is set to a user-defined value, and " +
@@ -168,11 +168,8 @@ class FlowsFromUntrusted extends TaintTracking::Configuration {
168168 * Holds if the provided `dst` is also destination of a `UntrustedFlowSource`.
169169 */
170170predicate flowsToGuardedByCheckOnUntrusted ( AllowOriginHeaderWrite allowOriginHW ) {
171- exists (
172- FlowsFromUntrusted cfg , DataFlow:: PathNode source , DataFlow:: PathNode sink ,
173- ControlFlow:: ConditionGuardNode cgn
174- |
175- cfg .hasFlowPath ( source , sink ) and cfg .isSink ( sink .getNode ( ) , cgn )
171+ exists ( FlowsFromUntrusted cfg , DataFlow:: Node sink , ControlFlow:: ConditionGuardNode cgn |
172+ cfg .hasFlowTo ( sink ) and cfg .isSink ( sink , cgn )
176173 |
177174 cgn .dominates ( allowOriginHW .getBasicBlock ( ) )
178175 )
0 commit comments