Bugzilla – Attachment 87461 Details for
Bug 22068
Canceling an article request should verify the request belongs to the borrower
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22068: (QA follow-up) Return meaningful error codes
Bug-22068-QA-follow-up-Return-meaningful-error-cod.patch (text/plain), 1.03 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-04-05 18:21:15 UTC
(
hide
)
Description:
Bug 22068: (QA follow-up) Return meaningful error codes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-04-05 18:21:15 UTC
Size:
1.03 KB
patch
obsolete
>From eaa82972f4f4f6a0dfa11e59966b399682a11575 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 5 Apr 2019 15:13:36 -0300 >Subject: [PATCH] Bug 22068: (QA follow-up) Return meaningful error codes > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > opac/opac-article-request-cancel.pl | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-article-request-cancel.pl b/opac/opac-article-request-cancel.pl >index 0305808a4b..ef9f75345d 100755 >--- a/opac/opac-article-request-cancel.pl >+++ b/opac/opac-article-request-cancel.pl >@@ -41,10 +41,14 @@ my $id = $query->param('id'); > > if ( $id ) { > my $ar = Koha::ArticleRequests->find( $id ); >- if ( !$ar || $ar->borrowernumber != $borrowernumber ) { >+ if ( !$ar ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); > exit; > } >+ elsif ( $ar->borrowernumber != $borrowernumber ) { >+ print $query->redirect("/cgi-bin/koha/errors/403.pl"); >+ exit; >+ } > > $ar->cancel(); > } >-- >2.21.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22068
:
85137
|
87438
|
87460
| 87461