TT#33356 Rewrite rule validation checks for ambiguous non-char escapes

* Sequences with escaping a non-special char in the search pattern
      like \43699 or \abc are now checked and prohibited

Change-Id: I72d65f2dbf5b9b9bae1ff37af098d74d238f77cb
(cherry picked from commit d045b35b3c)
changes/19/19719/1
Kirill Solomko 7 years ago
parent 2fe48a771a
commit 025b2e3a9a

@ -151,6 +151,10 @@ sub validate {
$self->field('replace_pattern')->add_error("Spaces are not allowed in replacement pattern");
}
if ( $s =~ /\\\w/i ) {
$self->field('match_pattern')->add_error("Ambiguous escape of non special characters");
}
my @acount;
@acount = $s =~ /(\@\{\w+\})/g;
if(@acount > 1) {

Loading…
Cancel
Save