[Bug 9299] New: for loop in Auth_with_ldap.pm requires an extended patron attribute to be set or LDAP logins fail
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Bug ID: 9299 Summary: for loop in Auth_with_ldap.pm requires an extended patron attribute to be set or LDAP logins fail Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.10 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: bryan.lakatos@mvschool.com If ExtendedPatronAttributes is enabled but no extended attributes are defined, then the for loop starting on line 181 of Auth_with_ldap.pm causes the array mentioned there to be undefined. This causes an error which prohibits LDAP logins: (the error returned is) Can't use an undefined value as an ARRAY reference at /usr/share/koha/lib/C4/Auth_with_ldap.pm line 181, <DATA> line 522. Disabling ExtendedPatronAttributes gets around the problem, but the loop ought to be made to do nothing if there are no attributes configured/defined. The offending loop: for (my $i; $i< scalar(@$extended_patron_attributes)-1;$i++) { my $attr=$extended_patron_attributes->[$i]; unless (C4::Members::Attributes::CheckUniqueness($attr->{code}, $attr->{value}, $borrowernumber)) { unshift @errors, $i; warn "ERROR_extended_unique_id_failed $attr->{code} $attr->{value}"; } -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Bryan Lakatos <bryan.lakatos@mvschool.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 --- Comment #1 from Robin Sheat <robin@catalyst.net.nz> --- I've seen this happen when extended attributes are defined, but it's definitely a problem. It might be when none are assigned to the user, or something like that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |srdjan@catalyst.net.nz Assignee|gmcharlt@gmail.com |srdjan@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 --- Comment #2 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 18652 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18652&action=edit bug_9299: rework unique attributes check on ldap login -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- To test: Have ldap server set up in koha-conf.xml and ExtendedPatronAttributes syspref enabled, with no extended attributes defined. Successful login should not throw an exception. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18652|0 |1 is obsolete| | Status|Needs Signoff |Signed Off CC| |nunyo@masmedios.com Assignee|srdjan@catalyst.net.nz |nunyo@masmedios.com --- Comment #4 from Nuño López Ansótegui <nunyo@masmedios.com> --- Created attachment 19861 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19861&action=edit [SIGNED-OFF] bug_9299: rework unique attributes check on ldap login Works fine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.10 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |brendan@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 --- Comment #5 from Bryan Lakatos <bryan.lakatos@mvschool.com> --- I verify that the submitted fix works. Can we move this on down the line into the package? Thanks! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19861|0 |1 is obsolete| | CC| |jonathan.druart@biblibre.co | |m --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21279 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21279&action=edit Bug 9299: rework unique attributes check on ldap login commit 73e89ab1bf24e8b43560ac0218ac0144d81985df Author: Srdjan <srdjan@catalyst.net.nz> Date: Wed Jun 5 16:34:29 2013 +1200 Bug 9299: rework unique attributes check on ldap login To reproduce: - configure a ldap server and $KOHA_CONF, etc. - try to log in - you will got a software error: Can't use an undefined value as an ARRAY reference at /home/koha/src/C4/Auth_with_ldap.pm line 183. Signed-off-by: Nuño López Ansótegui <nunyo@masmedios.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|brendan@bywatersolutions.co |jonathan.druart@biblibre.co |m |m --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- I reproduce the issue and I configure this patch fixes it. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- s/configure/confirm... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10925 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #9 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Srdjan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think we have run into this problem in 3.12 - maybe a candidate for a backport? Not sure if there are dependencies on other features in master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.12 --- Comment #11 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Katrin Fischer from comment #10)
I think we have run into this problem in 3.12 - maybe a candidate for a backport? Not sure if there are dependencies on other features in master.
It is a problem on 3.12, I'll change the version setting to indicate that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Srdjan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org