diff --git a/big_tests/tests/vcard_simple_SUITE.erl b/big_tests/tests/vcard_simple_SUITE.erl index 55f5e5a1f8..080d1cfa3c 100644 --- a/big_tests/tests/vcard_simple_SUITE.erl +++ b/big_tests/tests/vcard_simple_SUITE.erl @@ -458,8 +458,7 @@ ldap_opts() -> base => <<"ou=Users,dc=esl,dc=com">>, search_fields => [{"Full Name", "cn"}, {"User", "uid"}], vcard_map => [{"FN", "%s", ["cn"]}]}, - DefaultLDAPOpts = config_parser_helper:default_config([modules, mod_vcard, ldap]), - LDAPOptsWithDefaults = maps:merge(DefaultLDAPOpts, LDAPOpts), + LDAPOptsWithDefaults = config_parser_helper:config([modules, mod_vcard, ldap], LDAPOpts), config_parser_helper:mod_config(mod_vcard, #{backend => ldap, ldap => LDAPOptsWithDefaults}). ensure_started(HostType, Opts) -> diff --git a/src/config/mongoose_config_spec.erl b/src/config/mongoose_config_spec.erl index 96cc6ee5e3..18cf5ae4a3 100644 --- a/src/config/mongoose_config_spec.erl +++ b/src/config/mongoose_config_spec.erl @@ -633,8 +633,8 @@ outgoing_pool_connection(<<"ldap">>) -> }, format_items = map, include = always, - defaults = #{<<"rootdn">> => <<"">>, - <<"password">> => <<"">>, + defaults = #{<<"rootdn">> => <<>>, + <<"password">> => <<>>, <<"encrypt">> => none, <<"servers">> => ["localhost"], <<"connect_interval">> => 10000} diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl index 774fd935b8..ffac8d703d 100644 --- a/src/mod_shared_roster_ldap.erl +++ b/src/mod_shared_roster_ldap.erl @@ -131,15 +131,15 @@ config_spec() -> <<"useruid">> => <<"cn">>, <<"memberattr">> => <<"memberUid">>, <<"memberattr_format">> => <<"%u">>, - <<"memberattr_format_re">> => <<"">>, + <<"memberattr_format_re">> => <<>>, <<"auth_check">> => true, <<"user_cache_validity">> => ?USER_CACHE_VALIDITY, <<"group_cache_validity">> => ?GROUP_CACHE_VALIDITY, <<"user_cache_size">> => ?CACHE_SIZE, <<"group_cache_size">> => ?CACHE_SIZE, - <<"rfilter">> => <<"">>, - <<"gfilter">> => <<"">>, - <<"ufilter">> => <<"">>}, + <<"rfilter">> => <<>>, + <<"gfilter">> => <<>>, + <<"ufilter">> => <<>>}, CommonLDAPSpec#section{items = maps:merge(CommonLDAPSpec#section.items, Items), defaults = maps:merge(CommonLDAPSpec#section.defaults, Defaults), process = fun process_ldap_options/1}. @@ -533,7 +533,7 @@ parse_options(Host, #{base := Base, pool_tag := EldapID, deref := Deref, filter SubFilter = <<"(&(", UIDAttr/binary, "=", UIDAttrFormat/binary, ")(", GroupAttr/binary, "=%g))">>, UIDAttrFormatRe = case UIDAttrFormatReIn of - <<"">> -> UIDAttrFormatReIn; + <<>> -> UIDAttrFormatReIn; RE -> {ok, MP} = re:compile(RE), MP @@ -579,7 +579,7 @@ parse_options(Host, #{base := Base, pool_tag := EldapID, deref := Deref, filter group_cache_size = GroupCacheSize, group_cache_validity = GroupCacheValidity}. -check_filter(<<"">>) -> <<"">>; +check_filter(<<>>) -> <<>>; check_filter(F) -> {ok, _} = eldap_filter:parse(F), F. diff --git a/src/mongoose_ldap_config.erl b/src/mongoose_ldap_config.erl index 9d2af430bf..e1daab6e84 100644 --- a/src/mongoose_ldap_config.erl +++ b/src/mongoose_ldap_config.erl @@ -23,7 +23,7 @@ spec() -> <<"filter">> => #option{type = binary}}, defaults = #{<<"pool_tag">> => default, <<"deref">> => never, - <<"filter">> => <<"">>}, + <<"filter">> => <<>>}, format_items = map }.