@@ -91,9 +91,9 @@ predicate allowCredentialsIsSetToTrue(AllowOriginHeaderWrite allowOriginHW) {
91
91
* The `message` parameter is populated with the warning message to be returned by the query.
92
92
*/
93
93
predicate 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 )
97
97
|
98
98
message =
99
99
headerAllowOrigin ( ) + " header is set to a user-defined value, and " +
@@ -168,11 +168,8 @@ class FlowsFromUntrusted extends TaintTracking::Configuration {
168
168
* Holds if the provided `dst` is also destination of a `UntrustedFlowSource`.
169
169
*/
170
170
predicate 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 )
176
173
|
177
174
cgn .dominates ( allowOriginHW .getBasicBlock ( ) )
178
175
)
0 commit comments