diff options
author | ThibG <thib@sitedethib.com> | 2018-08-17 18:09:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-17 18:09:30 +0200 |
commit | 32075fe27f699d5a586e6ecf26c172550f9d4086 (patch) | |
tree | 61f48fa2dee608f72990f76a8f0497d670339252 /lib | |
parent | 4a6bc2482a26aa0441485ca360a3d3c0eeea7fe4 (diff) | |
parent | a16ff45d81d77d93f33ad57e746c780392ab1a1c (diff) |
Merge pull request #642 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/devise/ldap_authenticatable.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/devise/ldap_authenticatable.rb b/lib/devise/ldap_authenticatable.rb index ef786fbb7..534c7a851 100644 --- a/lib/devise/ldap_authenticatable.rb +++ b/lib/devise/ldap_authenticatable.rb @@ -24,7 +24,8 @@ module Devise connect_timeout: 10 ) - if (user_info = ldap.bind_as(base: Devise.ldap_base, filter: "(#{Devise.ldap_uid}=#{email})", password: password)) + filter = format(Devise.ldap_search_filter, uid: Devise.ldap_uid, email: email) + if (user_info = ldap.bind_as(base: Devise.ldap_base, filter: filter, password: password)) user = User.ldap_get_user(user_info.first) success!(user) else |