]> git.koha-community.org Git - koha.git/commit
Bug 10590 - in opac-topissues limit param is not protected
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Mon, 15 Jul 2013 11:00:18 +0000 (13:00 +0200)
committerChris Hall <followingthepath@gmail.com>
Thu, 18 Jul 2013 08:58:44 +0000 (20:58 +1200)
commit5260c7fe3bb2b50188a6c8bc4ed49a6eb45356ba
tree251d64dd50aeea90d39e2565656a7f0452a2afe2
parent69c824eb7c2d69b23c4e03dcc1f518980c5a7071
Bug 10590 - in opac-topissues limit param is not protected

In opac-topissues page, the limit URL argument is directly added to SQL query.

This patch adds protections : limit must only contain digits and must be lower than 100.

Test plan :
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=9999&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 100 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=WHERE&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 57866d6b67c3f8b29290150f21c71395315a73fe)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5867909f8866b4e68340b88817bfb95f51bc3c9e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 5867909f8866b4e68340b88817bfb95f51bc3c9e)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit c0cb1f8b0e8aa53707447ee7c27fd15fc0a7b80c)
opac/opac-topissues.pl