Bugzilla – Attachment 127103 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 use C4::Auth_with_cas if CAS is not used
Bug-28417-Dont-use-C4Authwithcas-if-CAS-is-not-use.patch (text/plain), 2.44 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-10-29 18:15:19 UTC
(
hide
)
Description:
Bug 28417: Don't use C4::Auth_with_cas if CAS is not used
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-10-29 18:15:19 UTC
Size:
2.44 KB
patch
obsolete
>From a5c675612f9c78a9207625bcf0e9ec89fc0e975f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 May 2021 14:26:29 +0200 >Subject: [PATCH] Bug 28417: Don't use C4::Auth_with_cas if CAS is not used > >We should follow the same pattern as ldap and not use C4::Auth_with_cas >if the cas syspref is not turned on. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Auth.pm | 9 +++++---- > C4/Auth_with_cas.pm | 2 +- > 2 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d6cd32d3eb..df0cf31425 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -72,14 +72,14 @@ BEGIN { > $ldap = C4::Context->config('useldapserver') || 0; > $cas = C4::Context->preference('casAuthentication'); > $caslogout = C4::Context->preference('casLogout'); >- require C4::Auth_with_cas; # no import > > if ($ldap) { > require C4::Auth_with_ldap; > import C4::Auth_with_ldap qw(checkpw_ldap); > } > if ($cas) { >- import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required); >+ require C4::Auth_with_cas; # no import >+ import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth); > } > > } >@@ -1340,8 +1340,9 @@ sub checkauth { > if ($cas) { > > # Is authentication against multiple CAS servers enabled? >- if ( C4::Auth_with_cas::multipleAuth && !$casparam ) { >- my $casservers = C4::Auth_with_cas::getMultipleAuth(); >+ require C4::Auth_with_cas; >+ if ( multipleAuth() && !$casparam ) { >+ my $casservers = getMultipleAuth(); > my @tmplservers; > foreach my $key ( keys %$casservers ) { > push @tmplservers, { name => $key, value => login_cas_url( $query, $key, $type ) . "?cas=$key" }; >diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm >index 8c922ece6a..dd02afc9ae 100644 >--- a/C4/Auth_with_cas.pm >+++ b/C4/Auth_with_cas.pm >@@ -33,7 +33,7 @@ our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required); >+ @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multilpleAuth getMultipleAuth); > } > my $defaultcasserver; > my $casservers; >-- >2.33.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