@@ -81,7 +81,7 @@ private class ExactStringPathMatchGuard extends UnsafeUrlForwardBarrierGuard ins
81
81
*/
82
82
private class AllowListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceof MethodAccess {
83
83
AllowListCheckGuard ( ) {
84
- ( isStringPathMatch ( this ) or isFilePathMatch ( this ) ) and
84
+ ( isStringPartialMatch ( this ) or isPathPartialMatch ( this ) ) and
85
85
not isDisallowedWord ( this .getAnArgument ( ) )
86
86
}
87
87
@@ -111,7 +111,7 @@ private class AllowListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceo
111
111
*/
112
112
private class BlockListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceof MethodAccess {
113
113
BlockListCheckGuard ( ) {
114
- ( isStringPathMatch ( this ) or isFilePathMatch ( this ) ) and
114
+ ( isStringPartialMatch ( this ) or isPathPartialMatch ( this ) ) and
115
115
isDisallowedWord ( this .getAnArgument ( ) )
116
116
}
117
117
@@ -137,18 +137,18 @@ private class BlockListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceo
137
137
}
138
138
139
139
/**
140
- * Holds if `ma` is a call to a method that checks a path string.
140
+ * Holds if `ma` is a call to a method that checks a partial string match .
141
141
*/
142
- private predicate isStringPathMatch ( MethodAccess ma ) {
142
+ private predicate isStringPartialMatch ( MethodAccess ma ) {
143
143
ma .getMethod ( ) .getDeclaringType ( ) instanceof TypeString and
144
144
ma .getMethod ( ) .getName ( ) =
145
145
[ "contains" , "startsWith" , "matches" , "regionMatches" , "indexOf" , "lastIndexOf" ]
146
146
}
147
147
148
148
/**
149
- * Holds if `ma` is a call to a method of `java.nio.file.Path` that checks a path.
149
+ * Holds if `ma` is a call to a method of `java.nio.file.Path` that checks a partial path match .
150
150
*/
151
- private predicate isFilePathMatch ( MethodAccess ma ) {
151
+ private predicate isPathPartialMatch ( MethodAccess ma ) {
152
152
ma .getMethod ( ) .getDeclaringType ( ) instanceof TypePath and
153
153
ma .getMethod ( ) .getName ( ) = "startsWith"
154
154
}
0 commit comments