aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHAMANO Tsukasa <code@cuspy.org>2015-01-19 15:25:58 +0900
committerHAMANO Tsukasa <code@cuspy.org>2015-01-19 15:25:58 +0900
commitcb57cfa1a64f6381b9081c88646d70d99f544ad7 (patch)
tree3c0ed76125d3a4e3ac7fe1ee21e33ef4cb84b8ba /src
parentchecking stringprep in scram authentication (diff)
correct fix for #396
Diffstat (limited to 'src')
-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 26e037001..8516b1734 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_list(Ret) -> ?WARNING_MSG("invalid plain password", []), {error, <<"not-authorized">>, UserName};
{Ret, _} ->
{StoredKey, ServerKey, Salt, IterationCount} =
if is_tuple(Ret) -> Ret;