Bugzilla – Attachment 173387 Details for
Bug 36822
When creating a new patron via LDAP or Shibboleth 0000-00-00 is inserted for invalid updated_on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file
Bug-36822-LDAP---Rearrange-Authwithldappm-so-it-pi.patch (text/plain), 1.92 KB, created by
Pedro Amorim
on 2024-10-25 14:58:38 UTC
(
hide
)
Description:
Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-25 14:58:38 UTC
Size:
1.92 KB
patch
obsolete
>From f163b275bb9aa6ed473098424f5259a80ff9e72d Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 25 Oct 2024 14:38:09 +0000 >Subject: [PATCH] Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up > on mock config from test file > >Without this rearrangement, C4::Context->config('useldapserver') is always 0. >It seems that because its inside a BEGIN block, the mock coming from .t file does not get picked up >--- > C4/Auth.pm | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d4b83bb75e..7ed071c1fb 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -82,14 +82,9 @@ BEGIN { > get_template_and_user haspermission create_basic_session > ); > >- $ldap = C4::Context->config('useldapserver') || 0; > $cas = C4::Context->preference('casAuthentication'); > $caslogout = C4::Context->preference('casLogout'); > >- if ($ldap) { >- require C4::Auth_with_ldap; >- import C4::Auth_with_ldap qw(checkpw_ldap); >- } > if ($cas) { > 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); >@@ -1995,10 +1990,13 @@ sub checkpw { > # 1 if auth is ok > # 0 if auth is nok > # -1 if user bind failed (LDAP only) >- >+ $ldap = C4::Context->config('useldapserver') || 0; > if ( $ldap && defined($password) ) { > my ( $retval, $retcard, $retuserid ); >- ( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_); # EXTERNAL AUTH >+ require C4::Auth_with_ldap; >+ import C4::Auth_with_ldap qw(checkpw_ldap); >+ >+ ( $retval, $retcard, $retuserid, $patron ) = C4::Auth_with_ldap::checkpw_ldap(@_); # EXTERNAL AUTH > if ( $retval == 1 ) { > @return = ( $retval, $retcard, $retuserid, $patron ); > $passwd_ok = 1; >-- >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 36822
:
173373
|
173374
|
173375
|
173376
|
173377
|
173385
|
173386
|
173387
|
173388
|
173389
|
173391
|
173392
|
173393
|
173394
|
173395
|
173402
|
173403
|
173404
|
173405
|
173406
|
173646
|
173903
|
173904
|
173905
|
173906
|
173907
|
173908
|
173909
|
174523
|
174525