LDAP - forced to login twice
- Status
- Open
- Subject
- LDAP - forced to login twice
- Version
- 17.x
- Category
- Usability
- Feature
- External Authentication (LDAP, AD, PAM, CAS, etc)
- Resolution status
- New
- Submitted by
- ihtus
- Lastmod by
- ihtus
- Rating
- Description
Installed a fresh tikiwiki 17.1.
Enabled and configured LDAP.When trying to login, getting this error in frontend:
"Authentication error"Had to login second time in order to be logged in.
Here are the LDAP logs:
Copy to clipboardUserLib::validate_user_ldap() Connect Host: ldap://192.168.1.1:389. Binddn: acovali@magna.global at line 225 in /srv/www/htdocs/wiki/lib/auth/ldap.php Searching for user information with filter: (sAMAccountName=acovali) at line 278 in /srv/www/htdocs/wiki/lib/auth/ldap.php Connect Host: ldap://192.168.1.1:389. Binddn: CN=First Last Name,OU=IT,OU=Accounts,OU=PFT,OU=America,OU=Cosma,OU=Magna Group,DC=magna,DC=global at line 225 in /srv/www/htdocs/wiki/lib/auth/ldap.php Bind successful. UsersLib::ldap_sync_user_data() UserLib::disable_tiki_auth()
Analyzed /lib/userslib.php, line 904 - 932It's not getting in "if ($result == USER_VALID)" because $result is a string that is a username
Copy to clipboard$result = $this->add_user($user, $pass, $email);
If I replace it withCopy to clipboard$result2 = $this->add_user($user, $pass, $email);
$result now would get value fromCopy to clipboard$result = $this->validate_user_ldap($user, $pass);
So this edit fixed the issue, and I was able to be logged in after first login attemptCopy to clipboard$result2 = $this->add_user($user, $pass, $email);- Importance
- 5
- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 6473
- Created
- Tuesday 31 October, 2017 13:46:39 UTC
by ihtus - LastModif
- Wednesday 01 November, 2017 12:18:44 UTC