25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Match ldap_uidattr_format case-insensitively (EJAB-1449)

This commit is contained in:
Evgeniy Khramtsov 2011-06-23 15:14:15 +10:00
parent 06e3503976
commit 8d4945aa7f

View File

@ -94,9 +94,13 @@ get_user_part(String, Pattern) ->
{'EXIT', _} -> {'EXIT', _} ->
{error, badmatch}; {error, badmatch};
Result -> Result ->
case re:replace(Pattern, "%u", Result, [{return, list}]) of case string:to_lower(
String -> {ok, Result}; re:replace(Pattern, "%u", Result, [{return, list}])) ==
_ -> {error, badmatch} string:to_lower(String) of
true ->
{ok, Result};
false ->
{error, badmatch}
end end
end. end.