Koha-clms/catalogue
Jonathan Druart f01720808a Bug 16593: Do not allow patrons to delete search history of others patrons
A malicious user can delete the search history of all other users by
correctly guessing the ID value assigned to the victim's search. As
searches are assigned values sequentially, an attacker could quickly
remove the searches belonging to all of the application's users.

To reproduce:
Login with patron A
launch a search
Note the id generated for this search history:
select id from search_history order by id desc limit 1;
Login with patron B
Hit /cgi-bin/koha/opac-search-history.pl?action=delete&id=<ID>
Note that the row is deleted in the DB

Test plan
Confirm that this patch fixes the issue.
The same test can be made at the staff interface

Reported by Alex Middleton at Dionach

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 11:47:29 +00:00
..
ISBDdetail.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
MARCdetail.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
detail.pl Bug 15263: (QA followup) Use the new XSLTParse4Display everywhere 2016-05-04 13:40:35 +00:00
export.pl Bug 16578: Same fix for the staff interface 2016-06-10 16:49:43 +00:00
getitem-ajax.pl Bug 14449: Add authentication check on retrieving item info when receiving 2015-07-20 10:10:59 -03: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 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
labeledMARCdetail.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
moredetail.pl Bug 16158: Move GetAuthorisedValues outside the loop 2016-04-27 16:30:01 +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 16448: Fix perlcritic errors introduced by 12478 2016-05-05 21:26:06 +00: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