Bugzilla – Attachment 193586 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
3adc158.patch (text/plain), 1.42 KB, created by
Kyle M Hall (khall)
on 2026-02-20 15:17:45 UTC
(
hide
)
Description:
Bug 41330: Escape braces in serials number management
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2026-02-20 15:17:45 UTC
Size:
1.42 KB
patch
obsolete
>From 3adc1585a7bbca82b118096a9dd8ceffe4b48281 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 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Serials.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 0e9d0341da2..0260673c0b9 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -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(?=;|$)/; >-- >2.50.1 (Apple Git-155) >
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
|
193585
| 193586