-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: User cannot authenticate with LDAP backend if multiple LDAP servers are configured #34993
Comments
I run into the exact same bug. |
I have upgraded from 24.0.7 to 25.0.1 because I ran out of idea ... I confirm the same issue with 25.0.1 too. |
While this is far from ideal, I suggest to downgrade to 24.0.6 until this bug has been fixed. |
Thanks a lot for your suggestions and instructions. Anyway, this configuration is only a workaround witch use an additional vpn tunel to operate with the other ldap server... Will see this in production ... Cross the fingers ! |
suddenly all ldap users have no data inside the webui, on the filesystem all data is available. update i found the reason, user_ldap is not respecting the folder name settings (samaccountname instead of guid) anymore, the path within the ldap users will connect to an guid instead the configured samaccountname. |
I upgraded to 24.0.7 and LDAP stopped working, because And yes: displayname is not being requested. $attrs =
EDIT: Multiple domains in use |
Downgrading JUST the user_ldap app (from 24.0.6 package) fixed the issue for now. |
Strangely enough, the user_ldap app version is 1.14.1 in NC 24.0.6 AND in NC 24.0.7 but the code is different... That's why I didn't looked into this component at first... I just looked at the version number, and since it was the exact same, I assumed the code was identical and the bug was elsewhere... |
There are just a few changes in the app between the two versions but something small affect the functionality :/ |
I can confirm this issue. I updated from 25.0.0 to 25.0.1 and no user can log in after the upgrade. The log is empty. |
Same here 24.0.6 > 24.0.7 and having two LDAP servers in the list. Running "sudo -u www-data php occ ldap:check-user [email protected]" multiple times gives me alternately outputs: Downgrading user_ldap app to 24.0.6 version works:
Also check-user --update throws an exception every second execution
|
The bug seems to be in Proxy.php. I managed to correct the bug by altering Proxy.php with the following modifications:
So, the issue is with the instantiation of $userManager using the Manager class... I must say I cannot elaborate further... I'm not really used to code in php. Someone else will probably find the root cause... EDIT: my patch was missing some variables declaration. As I said I'm not used to code in PHP |
After updating to 24.0.7, this problem appeared. Two domains are used for authorization. Left one domain - authorization has earned! |
If anyone needs the patched version of Proxy.php (to be placed in your nextcloud directory under apps/user_ldap/lib/ ) here is a link to the version I'm using which corrects this bug. EDIT: I'll remove this file as soon as an official patch has been released... EDIT 2: Official patch is available so I removed the link. |
@michel-nicol Thanks a lot for finding the source of that! Most likely the fix for 24 will look like what you did and we’ll try to do something prettier for 25 and master. What we missed here is that OCA\User_LDAP\User\Manager refers the Access class which differs for each LDAP connection and thus cannot be a singleton. |
@michel-nicol can you confirm #35070 fixes the issue as well? |
I will as soon as I can. |
Yes the proposed patch #35070 works. |
Hi, |
Hi, this must be a different bug as the issue was fixed by #35070. Please create a new bug report with up-to-date information. Thanks! |
Is there any workararound or fix for Nextcloud 26? |
Fix with the current commit: #35070 Backup
|
Bug description
After update from 24.0.6 to 24.0.7 : User cannot authenticate with LDAP backend if multiple LDAP servers are configured
It seems that the LDAP authentication proccess continue to check the user login on the next LDAP server even if authentication success. :
Steps to reproduce
Expected behavior
Authentication must be successful for users of server #1, #2 or #3
Installation method
No response
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a minor version (24.0.6 to 24.0.7)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: