Koha-clms/catalogue
Chris Cormack 210f7cdcf3 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>
(cherry picked from commit a64d14db20)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2017-07-19 23:17:49 +02:00
..
ISBDdetail.pl Bug 11592: (QA followup) Add missing framework code to ViewPolicy filter calls 2016-09-08 11:54:22 +00:00
MARCdetail.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
detail.pl Bug 17642: Add and use get_descriptions_by_koha_field 2016-11-18 15:52:00 +00: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 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
issuehistory.pl Bug 14244: viewing a bib item's circ history requires circulation permissions 2016-02-24 01:03:27 +00:00
itemsearch.pl Bug 16951: Replace some more 2016-12-22 19:26:08 +00:00
labeledMARCdetail.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::GetFrameworksLoop 2016-10-28 12:04:58 +00:00
moredetail.pl Bug 17642: Add and use get_descriptions_by_koha_field 2016-11-18 15:52:00 +00: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-19 23:17:49 +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