@@ -427,7 +427,6 @@ private predicate isSingleReplaceAll(StringReplaceAllCall replaceAllCall) {
427427 or
428428 targetValue .matches ( "%|%" ) and
429429 target .getStringValue ( ) .matches ( "%" + [ "\\.\\." , "[.][.]" , "\\." ] + "%" ) and
430- //targetValue.regexpMatch(".*(\\\\\\.\\\\\\.|\\[.\\]\\[.\\]|\\\\\\.).*") and
431430 targetValue .matches ( "%/%" ) and
432431 targetValue .matches ( "%\\\\\\\\%" )
433432 )
@@ -492,13 +491,12 @@ private predicate isMatchesCall(StringMatchesCall matchesCall, Expr checkedExpr,
492491 target .getStringValue ( ) = targetValue and
493492 checkedExpr = matchesCall .getQualifier ( )
494493 |
495- targetValue . regexpMatch ( "\\[(.*)\\]([*+]|\\{.*\\})" ) and
494+ target . getStringValue ( ) . matches ( [ "[%]*" , "[%]+" , "[%]{%}" ] ) and
496495 (
497496 // Allow anything except `.`, '/', '\'
498497 (
499498 // Note: we do not account for when '.', '/', '\' are inside a character range
500- // not targetValue.matches("[%" + [".", "/", "\\\\"] + "%]%") and
501- not targetValue .regexpMatch ( "\\[.*(\\.|\\\\|/).*\\].*" ) and
499+ not targetValue .matches ( "[%" + [ "." , "/" , "\\\\" ] + "%]%" ) and
502500 not targetValue .matches ( "%[^%]%" )
503501 or
504502 targetValue .matches ( "[^%.%]%" ) and
0 commit comments