]> git.koha-community.org Git - koha.git/commit
Bug 37210: Escape single quote in search string in overdue.pl
authorHammat Wele <hammat.wele@inlibro.com>
Thu, 27 Jun 2024 14:09:04 +0000 (14:09 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 25 Jul 2024 15:17:43 +0000 (15:17 +0000)
commit23a83cf7c2e3c27166efca75e66a6ed7bd38ac33
tree8faecbe2f3b66c8378bca3f161f923e0fabe09d5
parentec208128525d42b97a6d1fd390ca78c1f88e8856
Bug 37210: Escape single quote in search string in overdue.pl

To Test:
1. Go to /cgi-bin/koha/circ/overdue.pl
2. In the «Name or card number» field, type «Tommy'and(select(0)from(select(sleep(10)))v)and'»
3. Apply the filter
   ==> It takes 10 seconds, sleep(10) is executed
4. Inspect the page, in «Patron category:» field, put «Tommy'and(select(0)from(select(sleep(10)))v)and'» in one of his option's value
5. select the option from the filter and Apply the filter
   ==> It takes 10 seconds, sleep(10) is executed
we can inject SQL to the followin field : borname, itemtype, borcat, holdingbranch, homebranch and branch
6. Apply the patch
7. Repeat step 1,2,3
   ==> it doesn't take 10 seconds, the injected sql is not executed
8. Repeat step 5
==> it doesn't take 10 seconds, the injected sql is not executed
9. Repeat step 5 with the followin field : itemtype, holdingbranch, homebranch and branch
   ==> it doesn't take 10 seconds, the injected sql is not executed

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
circ/overdue.pl