From: HAMANO Tsukasa Date: Mon, 19 Jan 2015 07:00:18 +0000 (+0900) Subject: correct fix for #396 X-Git-Tag: 15.02~21^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e01eb734b4c30e9ee6efa937baaa436867b48af3;p=ejabberd correct fix for #396 --- diff --git a/src/cyrsasl_scram.erl b/src/cyrsasl_scram.erl index 8516b1734..dfd5d900d 100644 --- a/src/cyrsasl_scram.erl +++ b/src/cyrsasl_scram.erl @@ -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} when is_list(Ret) -> ?WARNING_MSG("invalid plain password", []), {error, <<"not-authorized">>, UserName}; + {_, error} when is_binary(Ret) -> ?WARNING_MSG("invalid plain password", []), {error, <<"not-authorized">>, UserName}; {Ret, _} -> {StoredKey, ServerKey, Salt, IterationCount} = if is_tuple(Ret) -> Ret;