Bugzilla – Attachment 161079 Details for
Bug 29930
'cardnumber' overwritten with userid when not mapped (LDAP auth)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29930: Cardnumber incorrectly set to userid on LDAP auth if cardnumber not mapped
Bug-29930-Cardnumber-incorrectly-set-to-userid-on-.patch (text/plain), 1.76 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-01-16 23:26:08 UTC
(
hide
)
Description:
Bug 29930: Cardnumber incorrectly set to userid on LDAP auth if cardnumber not mapped
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-01-16 23:26:08 UTC
Size:
1.76 KB
patch
obsolete
>From e33e5037a5fe94903d2714156d4696c95caa3661 Mon Sep 17 00:00:00 2001 >From: Janik Hilser <janik.hilser@icloud.com> >Date: Sun, 20 Feb 2022 18:14:31 +0100 >Subject: [PATCH] Bug 29930: Cardnumber incorrectly set to userid on LDAP auth > if cardnumber not mapped > >In the sub the userId was given, but the cardnumber was expected, therefore at every login the cardnumber changed to the userId. > >To test: >1. Login to the OPAC with an LDAP account that has a cardnumber which is different to the userId >2. Check the patron record's cardnumber. >3. The cardnumber should equal to the userId >4. Apply the patch. >5. Login to the OPAC with an LDAP account that has a cardnumber which is different to the userId >6. Check the patron record's cardnumber. >7. The cardnumber should be the same as before > >Signed-off-by: Alexander Wagner <alexander.wagner@desy.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Extra test plan: >1. Apply the regression tests >2. Run: > $ ktd --shell > k$ prove t/db_dependent/Auth_with_ldap.t >=> FAIL: Tests fail! 'cardnumber' incorrectly overwritten >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests now pass! >5. Sign off :-D >--- > C4/Auth_with_ldap.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 422a59a45b3..8195c99d6a7 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -206,7 +206,7 @@ sub checkpw_ldap { > > if (( $borrowernumber and $config{update} ) or > (!$borrowernumber and $config{replicate}) ) { >- %borrower = ldap_entry_2_hash($userldapentry,$userid); >+ %borrower = ldap_entry_2_hash($userldapentry,$cardnumber); > #warn "checkpw_ldap received \%borrower w/ " . keys(%borrower), " keys: ", join(' ', keys %borrower), "\n"; > } > >-- >2.43.0
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 29930
:
130926
|
154347
|
161078
|
161079
|
161085
|
161089
|
161090
|
161200
|
161201