Bugzilla – Attachment 190203 Details for
Bug 41330
Brace are not escaped in serials number management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41330: Escape braces in serials number management
Bug-41330-Escape-braces-in-serials-number-manageme.patch (text/plain), 1.30 KB, created by
Baptiste Wojtkowski (bwoj)
on 2025-12-05 11:48:44 UTC
(
hide
)
Description:
Bug 41330: Escape braces in serials number management
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2025-12-05 11:48:44 UTC
Size:
1.30 KB
patch
obsolete
>From a98ced2c2687f0a1e5ef37b4d7ef91118a5c46bf Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Fri, 28 Nov 2025 11:24:18 +0000 >Subject: [PATCH] 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 >--- > C4/Serials.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index b8f6b392166..8982eabfe69 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1207,7 +1207,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(?=;|$)/; >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41330
:
190202
|
190203
|
190212
|
190213