Bugzilla – Attachment 188323 Details for
Bug 41057
OPAC ILL visiting a URL directly does not respect ILLOpacbackends
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend
2411-Bug-41057-Return-404-if-creating-backend-is-n.patch (text/plain), 1.51 KB, created by
Pedro Amorim
on 2025-10-23 10:50:50 UTC
(
hide
)
Description:
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-10-23 10:50:50 UTC
Size:
1.51 KB
patch
obsolete
>From 352b23aa6580f0eef10920f2a6f93bb07f399560 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Mon, 20 Oct 2025 15:44:42 +0000 >Subject: [PATCH] [24.11] Bug 41057: Return 404 if creating backend is not an > OPAC backend > >Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk> >--- > opac/opac-illrequests.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index a4cf46b8125..712e86415e3 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -48,6 +48,13 @@ if ( ! C4::Context->preference('ILLModule') ) { > exit; > } > >+my $reduced = C4::Context->preference('ILLOpacbackends'); >+my $backends = Koha::ILL::Request::Config->new->available_backends( $reduced ); >+if ( $params->{backend} && !grep { $_ eq $params->{backend} } @$backends ) { >+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); >+ exit; >+} >+ > my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ > template_name => "opac-illrequests.tt", > query => $query, >@@ -55,8 +62,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ > }); > > # Are we able to actually work? >-my $reduced = C4::Context->preference('ILLOpacbackends'); >-my $backends = Koha::ILL::Request::Config->new->available_backends($reduced); > my $backends_available = ( scalar @{$backends} > 0 ); > $template->param( backends_available => $backends_available ); > my $patron = Koha::Patrons->find($loggedinuser); >-- >2.39.5
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 41057
:
188170
|
188171
|
188320
|
188322
| 188323 |
188325
|
188400