[Bug 40628] New: Enabling StockRotation results in LDAP users not being able to log in to OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40628 Bug ID: 40628 Summary: Enabling StockRotation results in LDAP users not being able to log in to OPAC Change sponsored?: --- Product: Koha Version: 24.11 Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P5 - low Component: Authentication Assignee: koha-bugs@lists.koha-community.org Reporter: schlanstedtjakob@gmail.com QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org # Description After enabling the StockRotation system preference, all LDAP users fail to log in to the OPAC. This occurs consistently in my environment with the following LDAP configuration in `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>ldaps://freeipa.example.org:636</hostname> <user>uid=admin,cn=users,cn=accounts,dc=example,dc=org</user> <base>cn=users,cn=accounts,dc=example,dc=org</base> <pass>********</pass> <auth_by_bind>1</auth_by_bind> <replicate>1</replicate> <update>1</update> <update_password>0</update_password> <anonymous_bind>0</anonymous_bind> <principal_name>uid=%s,cn=users,cn=accounts,dc=example,dc=org</principal_name> <mapping> <userid is="uid"></userid> <cardnumber is="uid"></cardnumber> <email is="mail"></email> <surname is="sn"></surname> <firstname is="givenname">-</firstname> <password is="userPassword"></password> <address is="address">Default Address</address> <city is="city">Default City</city> <categorycode is="1">01</categorycode> <branchcode is="1">01</branchcode> </mapping> </ldapserver> # Steps to reproduce 1. Enable LDAP authentication in `koha-conf.xml` (see config above). Confirm LDAP users can log in to OPAC. 2. Enable the StockRotation system preference in Administration → Global system preferences. 3. Attempt to log in as an LDAP user in OPAC. # Expected result LDAP users can still authenticate normally after enabling StockRotation. # Actual result LDAP users are unable to log in to OPAC. Local database accounts remain unaffected. # Additional notes - Disabling StockRotation immediately restores LDAP login functionality. - This was observed in my production environment; I have not tested on a completely fresh Koha installation due to resource limits. - No relevant changes observed in `opac-error.log` # Error log excerpts from /var/log/koha/family/plack-opac-error.log [2025/08/10 11:22:33] [WARN] Use of uninitialized value $stored_hash in string eq at /usr/share/koha/lib/C4/Auth.pm line 2118. [2025/08/10 11:22:33] [WARN] Use of uninitialized value $stored_hash in substr at /usr/share/koha/lib/C4/Auth.pm line 2122. [2025/08/10 11:22:33] [WARN] Use of uninitialized value $stored_hash in string eq at /usr/share/koha/lib/C4/Auth.pm line 2127. [2025/08/10 11:53:24] [WARN] Programming error - op 'cud-login' must not start with 'cud-' for GET https://koha.jakobschlanstedt.de/opac/errors/404.pl (referer: https://koha.jakobschlanstedt.de/cgi-bin/koha/opac-main.pl) at /usr/share/koha/lib/Koha/Middleware/CSRF.pm line 97. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40628 schlanstedtjakob@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |INVALID --- Comment #1 from schlanstedtjakob@gmail.com --- Actually I couldn't reproduce myself that way while this bug persist, i am still investigating on my server ??? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40628 --- Comment #2 from schlanstedtjakob@gmail.com --- I fixed the OPAC 403 login error in Koha by upgrading from version 24.11 to 25.05, which contains the CSRF middleware bug fix. The issue was caused by a bug introduced in Koha 24.05.08 that affected logins. Upgrading to 24.05.06+, 24.11.00+, or 25.05+ resolves it. Bug report: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37056 Release notes (CSRF introduction): https://koha-community.org/koha-24-05-08-released/ Koha downloads: https://koha-community.org/download-koha/ -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org