Bugzilla – Attachment 127251 Details for
Bug 28417
Authen::CAS::Client always loaded even if CAS is not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28417: Don't require C4::Auth_with_cas from opac-user if not needed
Bug-28417-Dont-require-C4Authwithcas-from-opac-use.patch (text/plain), 1.76 KB, created by
Jonathan Druart
on 2021-11-03 13:21:34 UTC
(
hide
)
Description:
Bug 28417: Don't require C4::Auth_with_cas from opac-user if not needed
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-11-03 13:21:34 UTC
Size:
1.76 KB
patch
obsolete
>From 40cdd2ed4b297c5e1b898b1a13e11c4724fb90d0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 Nov 2021 13:43:11 +0100 >Subject: [PATCH] Bug 28417: Don't require C4::Auth_with_cas from opac-user if > not needed > >Note that without the use URI::QueryParam statement in C4::Auth we get: >Can't locate object method "query_param_delete" via package "URI::_generic" at /kohadevbox/koha/C4/Auth.pm line 1254 >--- > C4/Auth.pm | 2 ++ > C4/Auth_with_cas.pm | 1 + > opac/opac-user.pl | 6 ++++-- > 3 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index df0cf31425b..b531ab4a6a5 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -23,6 +23,8 @@ use Carp qw( croak ); > > use Digest::MD5 qw( md5_base64 ); > use CGI::Session; >+use URI; >+use URI::QueryParam; > > use C4::Context; > use C4::Templates; # to get the template >diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm >index 5becd96fdc2..3817a69d700 100644 >--- a/C4/Auth_with_cas.pm >+++ b/C4/Auth_with_cas.pm >@@ -25,6 +25,7 @@ use Koha::AuthUtils qw( get_script_name ); > use Authen::CAS::Client; > use CGI qw ( -utf8 ); > use YAML::XS; >+use URI::Escape; > > use Koha::Logger; > >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 6feb144e508..e610cabc2ab 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -57,8 +57,10 @@ my $query = CGI->new; > > # CAS single logout handling > # Will print header and exit >-require C4::Auth_with_cas; >-C4::Context->preference('casAuthentication') and C4::Auth_with_cas::logout_if_required($query); >+if ( C4::Context->preference('casAuthentication') ) { >+ require C4::Auth_with_cas; >+ C4::Auth_with_cas::logout_if_required($query); >+} > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { >-- >2.25.1
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 28417
:
121276
|
127103
|
127104
|
127105
|
127106
|
127249
| 127251