Skip to content
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: Openldap password not correctly set #10309

Closed
gali0 opened this issue Jan 6, 2019 · 2 comments
Closed

Bug: Openldap password not correctly set #10309

gali0 opened this issue Jan 6, 2019 · 2 comments
Labels
Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

Comments

@gali0
Copy link

gali0 commented Jan 6, 2019

Bug

New created member can't authenticate from LDAP

Environment

  • Version: Dolibarr 8.0.4
  • OS: Debian 9
  • Web server: Apache2
  • PHP: PHP7
  • Database: Mysql

Use case

I have an OpenLDAP for authenticate members with other apps.
After created a new user and test to bind to LDAP I get "invalid credential"
I've test directly LDAP bind, with "Apache directory studio" and test password function, the password is definively not set correctly by dolibarr.

@gali0
Copy link
Author

gali0 commented Jan 6, 2019

Ok after research it appears that if I attach the salt found in the database to the password it works. So problem seen to be there.
After searching in the source code I suggest this modification:

replace:

if (! empty($conf->global->MAIN_SECURITY_SALT)) $chain=$conf->global->MAIN_SECURITY_SALT.$chain;

with:
if (! empty($conf->global->MAIN_SECURITY_SALT) && ( ! $type == '4' || ! $type == 'md5openldap')) $chain=$conf->global->MAIN_SECURITY_SALT.$chain;

@github-actions
Copy link

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. Without comment, this issue will be closed automatically by stale bot in 15 days.

@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Feb 11, 2020
hregis added a commit to hregis/dolibarr that referenced this issue Feb 11, 2020
eldy added a commit that referenced this issue Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Projects
None yet
Development

No branches or pull requests

1 participant