Koha/patroncards
Jonathan Druart a70980d825 Bug 17900: Fix possible SQL injection in patron cards template editing
To recreate:
/cgi-bin/koha/patroncards/edit-template.pl?op=edit&element_id=23%20and%201%3d2+union+all+select+1,user(),@@version+--%20

Look at the Profile dropdown list.

To fix this problem and to make sure it does not appears anywhere else
in the label and patroncards modules, I have refactored the way the
queries are built in C4::Creators::Lib
Now all of the subroutine takes a hashref in parameters with a 'fields'
and 'filters' parameters.
From these 2 parameters the new internal subroutine _build_query will
build the query and use placeholders.

Test plan:
1/ Make sure you do not recreate the vulnerability with this patch
applied.
2/ With decent data in the labels and patroncards modules, compare all
the different view (undef the New and Manage button groups) with and
without this patch applied.
=> You should not see any differences.

This vulnerability has been reported by MDSec.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-30 11:19:55 +00:00
..
add_user_search.pl Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
create-pdf.pl Bug 14138: Patroncard: Warn user if PDF creation fails 2016-07-15 15:00:56 +00:00
edit-batch.pl
edit-layout.pl Bug 15414: Silencing warns triggered by creating a new layout in patron card creator 2016-04-29 11:35:39 +00:00
edit-profile.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00
edit-template.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00
home.pl
image-manage.pl Bug 17181: Simplify code 2017-01-13 12:28:07 +00:00
manage.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00
print.pl Bug 17900: Fix possible SQL injection in patron cards template editing 2017-01-30 11:19:55 +00:00