From ef0561c90bf62c6b31621aa860d20cf27632674c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Baran?= Date: Wed, 23 Aug 2017 14:41:58 +0200 Subject: [PATCH] Ldap filter can use `;` character This change will allow user_field to contain characters such as `;`. This is useful because some of ldap attributes look like `login;organization`. --- src/authm_mad/remotes/ldap/ldap_auth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/authm_mad/remotes/ldap/ldap_auth.rb b/src/authm_mad/remotes/ldap/ldap_auth.rb index 3112ecde33..4fbb133281 100644 --- a/src/authm_mad/remotes/ldap/ldap_auth.rb +++ b/src/authm_mad/remotes/ldap/ldap_auth.rb @@ -127,7 +127,7 @@ class OpenNebula::LdapAuth def find_user(name) begin - filter = "#{@options[:user_field]}=#{escape(name)}" + filter = Net::LDAP::Filter.eq(@options[:user_field], escape(name)) result = @ldap.search( :base => @options[:base],