Bugzilla – Attachment 190213 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.34 KB, created by
David Nind
on 2025-12-05 14:22:58 UTC
(
hide
)
Description:
Bug 41330: Escape braces in serials number management
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-12-05 14:22:58 UTC
Size:
1.34 KB
patch
obsolete
>From 6948d04f74a29f2616e89858e81db80b43c69c10 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> >--- > C4/Serials.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index b8f6b39216..8982eabfe6 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.39.5
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