Commit 21f3bd95 authored by grahame's avatar grahame

escape username when building LDAP query

parent 36c53318
......@@ -23,7 +23,7 @@ pub fn ldap_search(username: &str) -> Option<LDAPUser> {
.search(
"cn=Users,dc=ad,dc=ucc,dc=gu,dc=uwa,dc=edu,dc=au",
Scope::Subtree,
&format!("(cn={})", username),
&format!("(cn={})", ldap3::ldap_escape(username)),
vec!["when_created", "displayName", "name"],
)
.expect("LDAP error")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment