mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Don't apply the group filter when listing LDAP group membership if it is empty (#23745)
When running listLdapGroupMemberships check if the groupFilter is empty before using it to list memberships. Fix #23615 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		| @@ -208,7 +208,7 @@ func (source *Source) listLdapGroupMemberships(l *ldap.Conn, uid string, applyGr | ||||
| 	} | ||||
|  | ||||
| 	var searchFilter string | ||||
| 	if applyGroupFilter { | ||||
| 	if applyGroupFilter && groupFilter != "" { | ||||
| 		searchFilter = fmt.Sprintf("(&(%s)(%s=%s))", groupFilter, source.GroupMemberUID, ldap.EscapeFilter(uid)) | ||||
| 	} else { | ||||
| 		searchFilter = fmt.Sprintf("(%s=%s)", source.GroupMemberUID, ldap.EscapeFilter(uid)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user