aboutsummaryrefslogtreecommitdiff
path: root/src/mod_vcard_ldap.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2011-06-15 20:06:32 +1000
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2011-06-15 20:06:32 +1000
commit6cc6c04c4a1a1ca4638141e86b12a0384c184cf6 (patch)
treec94d2bdad0bea50a50d56250d5f0f7f7aa64124c /src/mod_vcard_ldap.erl
parentClarify in mod_register_web example what host to put in the URL (diff)
Log an error when an LDAP filter is incorrect (EJAB-1395)
Diffstat (limited to '')
-rw-r--r--src/mod_vcard_ldap.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mod_vcard_ldap.erl b/src/mod_vcard_ldap.erl
index 30c694358..7afd1f210 100644
--- a/src/mod_vcard_ldap.erl
+++ b/src/mod_vcard_ldap.erl
@@ -740,10 +740,14 @@ parse_options(Host, Opts) ->
case ejabberd_config:get_local_option({ldap_filter, Host}) of
undefined -> SubFilter;
"" -> SubFilter;
- F -> "(&" ++ SubFilter ++ F ++ ")"
+ F ->
+ eldap_utils:check_filter(F),
+ "(&" ++ SubFilter ++ F ++ ")"
end;
"" -> SubFilter;
- F -> "(&" ++ SubFilter ++ F ++ ")"
+ F ->
+ eldap_utils:check_filter(F),
+ "(&" ++ SubFilter ++ F ++ ")"
end,
{ok, SearchFilter} = eldap_filter:parse(
eldap_filter:do_sub(UserFilter, [{"%u","*"}])),