B #5488: LDAP auth: escape username (#1399)

This commit is contained in:
Jan Orel authored and GitHub committed 2021-08-09 10:09:43 +02:00
1 parent fa041d9429
commit 1d3496ba58
1 file changed
+2 -1
+2 -1
View File
@@ -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]],