@@ -3,17 +3,17 @@ import testUtilities.InlineExpectationsTest
33import semmle.javascript.security.TaintedUrlSuffix
44
55module TestConfig implements DataFlow:: StateConfigSig {
6- class FlowState = DataFlow :: FlowLabel ;
6+ import semmle.javascript.security.CommonFlowState
77
8- predicate isSource ( DataFlow:: Node node , DataFlow :: FlowLabel state ) {
9- node = TaintedUrlSuffix:: source ( ) and state = TaintedUrlSuffix :: label ( )
8+ predicate isSource ( DataFlow:: Node node , FlowState state ) {
9+ node = TaintedUrlSuffix:: source ( ) and state . isTaintedUrlSuffix ( )
1010 or
1111 node instanceof RemoteFlowSource and
1212 not node = TaintedUrlSuffix:: source ( ) and
1313 state .isTaint ( )
1414 }
1515
16- predicate isSink ( DataFlow:: Node node , DataFlow :: FlowLabel state ) { none ( ) }
16+ predicate isSink ( DataFlow:: Node node , FlowState state ) { none ( ) }
1717
1818 predicate isSink ( DataFlow:: Node node ) {
1919 exists ( DataFlow:: CallNode call |
@@ -23,14 +23,13 @@ module TestConfig implements DataFlow::StateConfigSig {
2323 }
2424
2525 predicate isAdditionalFlowStep (
26- DataFlow:: Node node1 , DataFlow:: FlowLabel state1 , DataFlow:: Node node2 ,
27- DataFlow:: FlowLabel state2
26+ DataFlow:: Node node1 , FlowState state1 , DataFlow:: Node node2 , FlowState state2
2827 ) {
29- TaintedUrlSuffix:: step ( node1 , node2 , state1 , state2 )
28+ TaintedUrlSuffix:: isAdditionalFlowStep ( node1 , state1 , node2 , state2 )
3029 }
3130
32- predicate isBarrier ( DataFlow:: Node node , DataFlow :: FlowLabel label ) {
33- TaintedUrlSuffix:: isBarrier ( node , label )
31+ predicate isBarrier ( DataFlow:: Node node , FlowState state ) {
32+ TaintedUrlSuffix:: isStateBarrier ( node , state )
3433 }
3534}
3635
@@ -44,7 +43,7 @@ module InlineTest implements TestSig {
4443 exists ( TestFlow:: PathNode src , TestFlow:: PathNode sink | TestFlow:: flowPath ( src , sink ) |
4544 sink .getLocation ( ) = location and
4645 element = "" and
47- value = sink .getState ( )
46+ value = sink .getState ( ) . toString ( )
4847 )
4948 }
5049}
0 commit comments