@@ -81,7 +81,7 @@ private class ExactStringPathMatchGuard extends UnsafeUrlForwardBarrierGuard ins
8181 */
8282private class AllowListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceof MethodAccess {
8383 AllowListCheckGuard ( ) {
84- ( isStringPathMatch ( this ) or isFilePathMatch ( this ) ) and
84+ ( isStringPartialMatch ( this ) or isPathPartialMatch ( this ) ) and
8585 not isDisallowedWord ( this .getAnArgument ( ) )
8686 }
8787
@@ -111,7 +111,7 @@ private class AllowListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceo
111111 */
112112private class BlockListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceof MethodAccess {
113113 BlockListCheckGuard ( ) {
114- ( isStringPathMatch ( this ) or isFilePathMatch ( this ) ) and
114+ ( isStringPartialMatch ( this ) or isPathPartialMatch ( this ) ) and
115115 isDisallowedWord ( this .getAnArgument ( ) )
116116 }
117117
@@ -137,18 +137,18 @@ private class BlockListCheckGuard extends UnsafeUrlForwardBarrierGuard instanceo
137137}
138138
139139/**
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 .
141141 */
142- private predicate isStringPathMatch ( MethodAccess ma ) {
142+ private predicate isStringPartialMatch ( MethodAccess ma ) {
143143 ma .getMethod ( ) .getDeclaringType ( ) instanceof TypeString and
144144 ma .getMethod ( ) .getName ( ) =
145145 [ "contains" , "startsWith" , "matches" , "regionMatches" , "indexOf" , "lastIndexOf" ]
146146}
147147
148148/**
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 .
150150 */
151- private predicate isFilePathMatch ( MethodAccess ma ) {
151+ private predicate isPathPartialMatch ( MethodAccess ma ) {
152152 ma .getMethod ( ) .getDeclaringType ( ) instanceof TypePath and
153153 ma .getMethod ( ) .getName ( ) = "startsWith"
154154}
0 commit comments