[Bug 10925] New: LDAP Auth fails if DEBUG is enable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Bug ID: 10925 Summary: LDAP Auth fails if DEBUG is enable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Authentication Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org It the env var DEBUG is enable, the LDAP auth fails. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21282&action=edit Bug 10925: LDAP auth fails if DEBUG is enable To reproduce: 1/ Edit your apache virtual host and set the DEBUG environment variable (SetEnv DEBUG 1). 2/ Try to login with an ldap user 3/ You will be redirected to the 500 error page. The Koha logs contains: malformed header from script. Bad header=------------------------------: mainpage.pl The hashdump routine directly punks to the STDOUT (!) and breaks the headers. It appears Net::LDAP::?->dump does the same thing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10927 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9299 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz 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=10925 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gitbot@bugs.koha-community. | |org When did the bot| |2013-09-24 last check this| | --- Comment #2 from I'm just a bot <gitbot@bugs.koha-community.org> --- Patch applied cleanly, go forth and signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 21545 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21545&action=edit [SIGNED OFF] Bug 10925: LDAP auth fails if DEBUG is enable To reproduce: 1/ Edit your apache virtual host and set the DEBUG environment variable (SetEnv DEBUG 1). 2/ Try to login with an ldap user 3/ You will be redirected to the 500 error page. The Koha logs contains: malformed header from script. Bad header=------------------------------: mainpage.pl The hashdump routine directly punks to the STDOUT (!) and breaks the headers. It appears Net::LDAP::?->dump does the same thing. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21282|0 |1 is obsolete| | CC| |mtompset@hotmail.com --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 21282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21282 Bug 10925: LDAP auth fails if DEBUG is enable Figured out how to test this.... I set up an LDAP server on my koha VM: $ sudo apt-get install ldap-server $ sudo slapcat The second entry's 'dn' line will be important in setting up LDAP authentication. Made sure to set up the koha-conf.xml <useldapserver>1</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on --> <ldapserver id='ldapserver' listenref='ldapserver'> <hostname>demo.library.kohasystem.ca</hostname> <base>dc=nodomain</base> <user>CN=admin,OU=Special,OU=Accounts,DC=nodomain</user> <pass>ldap123</pass> <replicate>1</replicate> <update>1</update> <auth_by_bind>1</auth_by_bind> <principal_name>CN=%s,DC=nodomain</principal_name> <mapping> <firstname is='givenname'></firstname> <surname is='sn'> </surname> <address is='postaladdress'>3900 University Blvd</address> <city is='l'>Tyler, TX</city> <zipcode is='postalcode'>75799</zipcode> <branchcode is=''>MNL</branchcode> <userid is='cn'></userid> <password is=''></password> <cardnumber is='extensionattribute2'></cardnumber> <email is='userprincipalname'></email> <categorycode is=''>PT</categorycode> <phone is='telephonenumber'>903-566-7343</phone> <dateenrolled is=''>2011-03-27</dateenrolled> <dateexpiry is=''>2011-05-13</dateexpiry> </mapping> </ldapserver> It is important to get the patron type and branch code to match something in your DB. Notice the principle_name line is similar to the second entry's 'dn' line. And yes, I was lazy setting it up and used ldap123 as the password for the admin account. And since I didn't know how to set up any other accounts, I just used the admin account. I then proceeded to log in using OPAC. BEFORE PATCH: #SetEnv DEBUG 1 delete patron log in, log out, log in, log out (previously exist or not cases) -- ALL GOOD! SetEnv DEBUG 1 delete patron log in, log in (previously exist or not cases) -- ALL FAIL! AFTER PATCH: -- ALL GOOD! Signed off. YAY! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21545|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 21685 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21685&action=edit Bug 10925: LDAP auth fails if DEBUG is enable To reproduce: 1/ Edit your apache virtual host and set the DEBUG environment variable (SetEnv DEBUG 1). 2/ Try to login with an ldap user 3/ You will be redirected to the 500 error page. The Koha logs contains: malformed header from script. Bad header=------------------------------: mainpage.pl The hashdump routine directly punks to the STDOUT (!) and breaks the headers. It appears Net::LDAP::?->dump does the same thing. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Maybe we can kill C4::Utils after getting rid of this -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Chris Cormack from comment #5)
Maybe we can kill C4::Utils after getting rid of this
That's what 10927 does. I've signed it off. It is awaiting QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org