The LDAP connection test does not check the credentials
|Assignee:||Jean-Philippe Lang||% Done:|
In the current version and the last trunk, the Authenticacion Modes that works through LDAP does not check the username or password.
This can be a problem, because, if the LDAP Server is available but does not return any response due to an incorrect username and password, and can't bind the connection.
This patch adds the possibility in the moment to do a LDAP connection Test, if the username and password is defined it binds to check that are correct, else returns an exception with it's error.
I've added the follow test to check the username and the password, as the connectivity against the LDAP Server.
This patch has been tested with the last Trunk (14992) and the configurations of the LDAP Server that comes included to do the tests.
vagrant@redmine:/opt/redmine/trunk# RAILS_ENV="test" rake test test/unit/auth_source_ldap_test.rb Run options: --seed 12217 # Running: ....................... Finished in 3.987555s, 5.7679 runs/s, 20.0624 assertions/s. 23 runs, 80 assertions, 0 failures, 0 errors, 0 skips vagrant@redmine:/opt/redmine/trunk#
Fixed that LDAP does not check the user and password when are defined in the method of authentication (#21674).
Patch by Helder Manuel Torres Vieira.
#2 Updated by Jean-Philippe Lang over 5 years ago
- Subject changed from LDAP does not check the user and password when are defined in the method of authentication. to LDAP does not check the user and password that are defined in the method of authentication
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Patch committed, thanks.