Bug 41330: Escape braces in serials number management
Do not apply patches before
1 - Create a new subscription to a serial
2 - Go to 'Serial Collection' panel and click on edit serials button
3 - Try and edit the serial number to "{1}" -> error 500
4 - Apply only unit tests patch and run `prove t/Serials/ModSerialStatus.t` -> Tests will
not pass
5 - Apply patch and proceed again to 2&3 -> you will get no error
6 - run `prove t/Serials/ModSerialStatus.t` -> tests will pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
4fd0ba028c
commit
c48aef304f
|
|
@ -1217,7 +1217,7 @@ sub _handle_seqno {
|
|||
|
||||
my ( $seq, $list, $op ) = @_; # op = ADD | REMOVE | CHECK (default: ADD)
|
||||
my $seq_r = $seq;
|
||||
$seq_r =~ s/([()])/\\$1/g; # Adjust disturbing parentheses for regex, maybe extend in future
|
||||
$seq_r =~ s/([(){}])/\\$1/g; # Adjust disturbing parentheses for regex, maybe extend in future
|
||||
|
||||
if ( !$op or $op eq 'ADD' ) {
|
||||
$list .= "; $seq" if $list !~ /(^|;)\s*$seq_r(?=;|$)/;
|
||||
|
|
|
|||
Loading…
Reference in New Issue