You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: If an DN had some escaped special Characters in the value (at my scenario it is a comma), then getMemberOf Method crashed with "wrong Credentials".
Added this Method (copied from moodle-code). /** * Quote control characters in texts used in LDAP filters - see RFC 4515/2254 * * @param string filter string to quote * @return string the filter string quoted */ protected function ldap_filter_addslashes($text) { $text = str_replace('\\', '\\5c', $text); $text = str_replace(array('*', '(', ')', "\0"), array('\\2a', '\\28', '\\29', '\\00'), $text); return $text; }
The text was updated successfully, but these errors were encountered:
Problem: If an DN had some escaped special Characters in the value (at my scenario it is a comma), then getMemberOf Method crashed with "wrong Credentials".
Added this Method (copied from moodle-code).
/** * Quote control characters in texts used in LDAP filters - see RFC 4515/2254 * * @param string filter string to quote * @return string the filter string quoted */ protected function ldap_filter_addslashes($text) { $text = str_replace('\\', '\\5c', $text); $text = str_replace(array('*', '(', ')', "\0"), array('\\2a', '\\28', '\\29', '\\00'), $text); return $text; }
The text was updated successfully, but these errors were encountered: