Koha-clms/catalogue
Chris Cormack a64d14db20 Bug 18854 - Protect from DOS
There was a bug that meant a very large offset in the search params
will cause the search script to run forever (or long enough to crash
the machine)

To test

1/ Get ready with sudo top so you can kill the thread before it causes
your machine to OOM
2/ Hit a page like yourdomain.com/cgi-bin/koha/opac-search.pl?q=1&offset=-9999999999999999999
3/ Notice the process runs for a long time
4/ Kill the process
5/ Apply the patch
6/ Hit the page again, notice the it loads (offset is set to zero)
7/ Do the same to search in the staff client

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: changed -2 to 0 in opac-search.pl.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99b32717cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2017-07-18 15:28:44 +02:00
..
ISBDdetail.pl Bug 17736: Replace GetReservesFromBiblionumber with Koha::Biblio->holds 2017-03-31 12:02:14 +00:00
MARCdetail.pl Bug 17736: Replace GetReservesFromBiblionumber with Koha::Biblio->holds 2017-03-31 12:02:14 +00:00
detail.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
export.pl Bug 16578: Same fix for the staff interface 2016-06-10 16:49:43 +00:00
getitem-ajax.pl Bug 17642: use get_description_by_koha_field when needed 2016-11-18 15:52:00 +00:00
image.pl Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-16 17:28:06 +00:00
imageviewer.pl Bug 17736: Replace GetReservesFromBiblionumber with Koha::Biblio->holds 2017-03-31 12:02:14 +00:00
issuehistory.pl Bug 17679: C4::Circulation - Remove unused GetItemIssues 2016-12-28 13:52:24 +00:00
itemsearch.pl Bug 18633: Remove remaining use of CGI.param in template 2017-07-18 13:56:24 +02:00
labeledMARCdetail.pl Bug 17736: Replace GetReservesFromBiblionumber with Koha::Biblio->holds 2017-03-31 12:02:14 +00:00
moredetail.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
search-history.pl Bug 16593: Do not allow patrons to delete search history of others patrons 2016-06-24 11:47:29 +00:00
search.pl Bug 18854 - Protect from DOS 2017-07-18 15:28:44 +02:00
showmarc.pl Bug 6520: Display items for staged record 2015-04-16 13:40:46 -03:00
updateitem.pl Bug 13024 - Nonpublic note not appearing in the staff client 2015-12-04 14:47:57 +00:00