1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

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

This commit is contained in:
Jan Orel 2021-08-09 10:09:43 +02:00 committed by GitHub
parent fa041d9429
commit 1d3496ba58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]],