correct fix for #396

This commit is contained in:
HAMANO Tsukasa 2015-01-19 15:25:58 +09:00
parent ede5a353e8
commit cb57cfa1a6
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ mech_step(#state{step = 2} = State, ClientIn) ->
{Ret, _AuthModule} = (State#state.get_password)(UserName),
case {Ret, jlib:resourceprep(Ret)} of
{false, _} -> {error, <<"not-authorized">>, UserName};
{_, error} -> ?WARNING_MSG("invalid password", []), {error, <<"not-authorized">>, UserName};
{_, error} when is_list(Ret) -> ?WARNING_MSG("invalid plain password", []), {error, <<"not-authorized">>, UserName};
{Ret, _} ->
{StoredKey, ServerKey, Salt, IterationCount} =
if is_tuple(Ret) -> Ret;