Skip to content

Commit d2974cf

Browse files
committed
Fix processing of ldap_memberattr_format_re option
This makes sure that "" value is handled as before options processing overhaul. This fixed ldap shared roster testcase
1 parent dc60161 commit d2974cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mod_shared_roster_ldap.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,11 @@ mod_opt_type(ldap_memberattr_format) ->
575575
fun iolist_to_binary/1;
576576
mod_opt_type(ldap_memberattr_format_re) ->
577577
fun (S) ->
578-
Re = iolist_to_binary(S), {ok, MP} = re:compile(Re), MP
578+
Re = iolist_to_binary(S),
579+
case Re of
580+
<<>> -> <<>>;
581+
_ -> {ok, MP} = re:compile(Re), MP
582+
end
579583
end;
580584
mod_opt_type(ldap_rfilter) ->
581585
opt_type(ldap_rfilter);

0 commit comments

Comments
 (0)