MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
The group names we get from ldap_find_user_groups() can contain invalid LDAP filter characters. So we need to escape them for LDAP filter usage.
This commit is contained in:
@@ -720,6 +720,7 @@ class enrol_ldap_plugin extends enrol_plugin {
|
||||
$usergroups = $this->ldap_find_user_groups($extmemberuid);
|
||||
if(count($usergroups) > 0) {
|
||||
foreach ($usergroups as $group) {
|
||||
$group = ldap_filter_addslashes($group);
|
||||
$ldap_search_pattern .= '('.$this->get_config('memberattribute_role'.$role->id).'='.$group.')';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user