Fix the username validation when an admin update the user

This commit is contained in:
Roman Perekhod
2023-06-06 17:15:38 +02:00
parent 2372b50116
commit 1ac49dfd64
6 changed files with 26 additions and 8 deletions
+1 -1
View File
@@ -529,7 +529,7 @@ func (i *LDAP) getGroupByDN(dn string) (*ldap.Entry, error) {
func (i *LDAP) getGroupsForUser(dn string) ([]*ldap.Entry, error) {
groupFilter := fmt.Sprintf(
"(%s=%s)",
i.groupAttributeMap.member, dn,
i.groupAttributeMap.member, ldap.EscapeFilter(dn),
)
userGroups, err := i.getLDAPGroupsByFilter(groupFilter, false, false)
if err != nil {