diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-04-04 12:45:12 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-04-04 12:45:12 +0200 |
commit | d13ef49b155d74847c9af049ea526c66a1a804f6 (patch) | |
tree | b6eace938bea09a67e7ec335abd1e24b3d5afb2c /app/models | |
parent | af01ab7efebab356e73b498afe4258ae7515cc6a (diff) | |
parent | 0e919397db4977182386b93d2092fdeb5dff1f16 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/ldap_authenticable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/ldap_authenticable.rb b/app/models/concerns/ldap_authenticable.rb index dc5abcd5a..775df0817 100644 --- a/app/models/concerns/ldap_authenticable.rb +++ b/app/models/concerns/ldap_authenticable.rb @@ -6,7 +6,7 @@ module LdapAuthenticable class_methods do def authenticate_with_ldap(params = {}) ldap = Net::LDAP.new(ldap_options) - filter = format(Devise.ldap_search_filter, uid: Devise.ldap_uid, mail: Devise.ldap_mail, email: params[:email]) + filter = format(Devise.ldap_search_filter, uid: Devise.ldap_uid, mail: Devise.ldap_mail, email: Net::LDAP::Filter.escape(params[:email])) if (user_info = ldap.bind_as(base: Devise.ldap_base, filter: filter, password: params[:password])) ldap_get_user(user_info.first) |