aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cyrsasl_scram.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cyrsasl_scram.erl b/src/cyrsasl_scram.erl
index f98ad7d21..1fd7c1be5 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} -> ?WARNING_MSG("invalid 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;