diff --git a/src/authm_mad/remotes/ldap/ldap_auth.rb b/src/authm_mad/remotes/ldap/ldap_auth.rb index 7f5bbbd3f0..359425f487 100644 --- a/src/authm_mad/remotes/ldap/ldap_auth.rb +++ b/src/authm_mad/remotes/ldap/ldap_auth.rb @@ -161,7 +161,8 @@ class OpenNebula::LdapAuth end def is_in_group?(user, group) - username = user.first.force_encoding(Encoding::UTF_8) + username = Net::LDAP::Filter.escape( + user.first.force_encoding(Encoding::UTF_8)) result=@ldap.search( :base => group, :attributes => [@options[:group_field]],