]> source.dussan.org Git - redmine.git/commitdiff
Do not bind when the account contains $login (#21674).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 22 Jan 2016 18:16:00 +0000 (18:16 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 22 Jan 2016 18:16:00 +0000 (18:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15090 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/auth_source_ldap.rb

index 6dda73d9f1746184ca94468fcc4bd5722eb6be8a..abbb4661775b0dc7eefcc4997830b0df020da417 100644 (file)
@@ -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