@@ -427,7 +427,6 @@ private predicate isSingleReplaceAll(StringReplaceAllCall replaceAllCall) {
427
427
or
428
428
targetValue .matches ( "%|%" ) and
429
429
target .getStringValue ( ) .matches ( "%" + [ "\\.\\." , "[.][.]" , "\\." ] + "%" ) and
430
- //targetValue.regexpMatch(".*(\\\\\\.\\\\\\.|\\[.\\]\\[.\\]|\\\\\\.).*") and
431
430
targetValue .matches ( "%/%" ) and
432
431
targetValue .matches ( "%\\\\\\\\%" )
433
432
)
@@ -492,13 +491,12 @@ private predicate isMatchesCall(StringMatchesCall matchesCall, Expr checkedExpr,
492
491
target .getStringValue ( ) = targetValue and
493
492
checkedExpr = matchesCall .getQualifier ( )
494
493
|
495
- targetValue . regexpMatch ( "\\[(.*)\\]([*+]|\\{.*\\})" ) and
494
+ target . getStringValue ( ) . matches ( [ "[%]*" , "[%]+" , "[%]{%}" ] ) and
496
495
(
497
496
// Allow anything except `.`, '/', '\'
498
497
(
499
498
// 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
502
500
not targetValue .matches ( "%[^%]%" )
503
501
or
504
502
targetValue .matches ( "[^%.%]%" ) and
0 commit comments