Bugzilla – Attachment 188171 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.39 KB, created by
Pedro Amorim
on 2025-10-20 15:47:42 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-20 15:47:42 UTC
Size:
1.39 KB
patch
obsolete
>From 97780ea81593bc4af563e2db80f30b712eac9712 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 > >--- > opac/opac-illrequests.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index a4cf46b8125..468c694a735 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -43,7 +43,11 @@ my $query = CGI->new; > our $params = $query->Vars(); > > # if illrequests is disabled, leave immediately >-if ( ! C4::Context->preference('ILLModule') ) { >+my $reduced = C4::Context->preference('ILLOpacbackends'); >+my $opac_backends = Koha::ILL::Request::Config->new->available_backends( $reduced ); >+if ( ! C4::Context->preference('ILLModule') >+ || ( $params->{backend} && !grep { $_ eq $params->{backend} } @$opac_backends ) ) >+{ > print $query->redirect("/cgi-bin/koha/errors/404.pl"); > exit; > } >@@ -55,7 +59,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 ); >-- >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