Bug 22429: Infinite loop in patron card printing
authorDavid Cook <dcook@prosentient.com.au>
Mon, 4 Mar 2019 06:43:29 +0000 (17:43 +1100)
committerroot <root@f1ebe1bec408>
Fri, 15 Mar 2019 11:59:28 +0000 (11:59 +0000)
commit3bd900496690375b2b711743ffaa57371388f687
treea4e3045b19adb522494b444b8886417b13591c8c
parent2596e9b795d9e65e4f68a72bb587d323c97bad92
Bug 22429: Infinite loop in patron card printing

Text fields in Patron Card Text Layouts can contain regular
expression metacharacters, which - instead of being treated as
literal values - are interpreted and prevent line wrapping. This
causes the process to get stuck in an infinite loop, which keeps
running even after the web server has timed out (at least when
using CGI).

This patch escapes the relevant input from the text field so the
regular expression substitution treats characters as literals
instead of as metacharacters.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Patroncards/Patroncard.pm