Giving sortfield a malformed value when viewing lists results in Internal Server Error. eg. virtualshelves/shelves.pl?op=view&shelfnumber=619&sortfield=author( Note the trailing (
Created attachment 90441 [details] [review] Bug 22941: Do not return 500 if sortfield contain parenthesis Test plan: Hit /virtualshelves/shelves.pl?op=view&shelfnumber=1&sortfield=author( You must not get: Unmatched ( in regex; marked by <-- HERE in m/^author( <-- HERE $/ at /home/vagrant/kohaclone/virtualshelves/shelves.pl line 236
Created attachment 90583 [details] [review] Bug 22941: Do not return 500 if sortfield contain parenthesis Test plan (on staff client of kohadevbox after making a list): http://localhost:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=1&sortfield=title(&direction=desc You must not get: Unmatched ( in regex; marked by <-- HERE in m/^author( <-- HERE $/ at /home/vagrant/kohaclone/virtualshelves/shelves.pl line 236 Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 90590 [details] [review] Bug 22941: Do not return 500 if sortfield contain parenthesis Test plan: Hit /virtualshelves/shelves.pl?op=view&shelfnumber=1&sortfield=author( You must not get: Unmatched ( in regex; marked by <-- HERE in m/^author( <-- HERE $/ at /home/vagrant/kohaclone/virtualshelves/shelves.pl line 236 Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, no QA script failures.. Passing QA
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.01
backported to 18.11.x for 18.11.07