LDAP Search Filter buggy (0.9.9-8 PRO)
-
i-doit Version 0.9.9-8 PRO
User Authentifizierung gegen OpenLDAP Server.Der searchfilter wird nicht richtig zusammengebaut:
Creating new ldap-library connection to: ldap.foo.bar:389, user: cn=reader,dc=foo,dc=bar
Connected to ldap.foo.bar
Searching for username: testuser
Getting user(s) using filter: (&(&(objectClass=posixaccount)(cn=testuser)) in search-path: OU=people,DC=foo,DC=bar
ldap: ** No user found.
User not found. Check if testuser exist in your configured search-path: OU=people,DC=foo,DC=barEs fehlt eine dritte schliessende Klammer.
Mit folgender Modifikation in classes/libraries/isys_library_ldap.class.php Zeile 86:
$l_filter = "(&(".$l_current_filter.")(".$l_map_username."=".$p_username.")))";
statt
$l_filter = "(&(".$l_current_filter.")(".$l_map_username."=".$p_username."))";
funktioniert die Suche ("####" = zusaeztlicher Debug Output):
Searching for username: testuser
l_current_filter = &(objectClass=posixAccount
l_filter = (&(&(objectClass=posixAccount)(uid=testuser)))
l_map_username = uid
p_username = testuser
Getting user(s) using filter: (&(&(objectClass=posixAccount)(uid=testuser))) in search-path: OU=People,DC=foo,DC=bar
Search result Resource id #72
Found DN: uid=testuser,ou=People,dc=foo,dc=bar. Trying to login with it.
Auth successfull (uid=testuser,ou=People,dc=foo,dc=bar).Gruss,
Matthias -
Hi Matthias,
änder mal bitte den Filter manuell in der Datenbank in der Tabelle isys_ldap ab. Beim Speichern über die Oberfläche gibt es da teilweise ein unerwünschtes Verhalten.
Lieben Gruß
Christian
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login