25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +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 6cc6c04c4a
commit 35644cf73c

View File

@ -95,7 +95,14 @@ get_user_part(String, Pattern) ->
{error, badmatch};
Result ->
case regexp:sub(Pattern, "%u", Result) of
{ok, String, _} -> {ok, Result};
{ok, StringRes, _} ->
case (string:to_lower(StringRes) ==
string:to_lower(String)) of
true ->
{ok, Result};
false ->
{error, badmatch}
end;
_ -> {error, badmatch}
end
end.