[Koha-bugs] [Bug 29781] Allow item batch modification to use capturing groups in regex option

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 11 16:26:30 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29781

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at bywatersolutions.com

--- Comment #13 from Nick Clemens <nick at bywatersolutions.com> ---
I tried executing code and couldn't exploit it

perl -e 'use Koha::Items; warn Koha::Items::apply_regex({value=>q{KF 123 .A987
c. 11  v. 22},search=>q{(^[A-Z]+
\d+\b)\s+(\.[A-Z]+\d+\b)\s+(c\.\s\d+\b)\s+(v\.\s\d+\b)}, replace=>q{ $1 $2 $4
$3 object_class() }});'

If I comment out the lines that quote the replace I get 'Koha::Items' - so that
protection seems to work

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list