]> git.koha-community.org Git - koha.git/commit
Bug 22068: Prevent patrons to cancel article request they did not create
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 14 Feb 2019 20:03:17 +0000 (17:03 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 15 Apr 2019 18:08:40 +0000 (18:08 +0000)
commit96a700c3dd0d4008c6c0250ac24c8c0c2e8b9dee
tree74d2ddd6c52ac1bf406cf250427cbfd086041c2f
parent4250579e3f6a7c7e941376b31d48a854f0ad7c43
Bug 22068: Prevent patrons to cancel article request they did not create

opac-article-request-cancel.pl doesn't check that the article request to
be cancelled actually belongs to the logged-in borrower. This results in
any logged-in user being able to cancel any article request just by
changing the id in the URL.

Test plan:
- Login with Patron P1, create an article request
- Cancel it
- Create another one
- Copy the cancellation link (must be /cgi-bin/koha/opac-article-request-cancel.pl?id=X)
- Login with Patron P2
- Hit the cancellation link
=> Without this patch the article request is cancelled
=> With this patch applied there is a 404 redirection

Note that the 404 will also appears when the article request id does not
exist.

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0b931d5de3c4fe9fa2b4823d9b8727b28a46aa7c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc32211a8ea12e67453e5af9edaac0a73b52e2de)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
opac/opac-article-request-cancel.pl