25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +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}; {error, badmatch};
Result -> Result ->
case regexp:sub(Pattern, "%u", Result) of 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} _ -> {error, badmatch}
end end
end. end.