summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-22 18:16:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-22 18:16:00 +0000
commit90159ef1cf1dbcb1a59a5f786b3c68d86ceddc9c (patch)
tree071a7f8ac42a1a26f09acadca081483fe9ea1560
parent5bb0ad461d300db5ec8681294991402f10a974bc (diff)
downloadredmine-90159ef1cf1dbcb1a59a5f786b3c68d86ceddc9c.tar.gz
redmine-90159ef1cf1dbcb1a59a5f786b3c68d86ceddc9c.zip
Do not bind when the account contains $login (#21674).
git-svn-id: http://svn.redmine.org/redmine/trunk@15090 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/auth_source_ldap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb
index 6dda73d9f..abbb46617 100644
--- a/app/models/auth_source_ldap.rb
+++ b/app/models/auth_source_ldap.rb
@@ -62,7 +62,7 @@ class AuthSourceLdap < AuthSource
ldap_con = initialize_ldap_con(self.account, self.account_password)
ldap_con.open { }
- if self.account.present? && self.account_password.present?
+ if self.account.present? && !self.account.include?("$login") && self.account_password.present?
ldap_auth = authenticate_dn(self.account, self.account_password)
raise AuthSourceException.new(l(:error_ldap_bind_credentials)) if !ldap_auth
end