]> granicus.if.org Git - ejabberd/commitdiff
correct fix for #396
authorHAMANO Tsukasa <code@cuspy.org>
Mon, 19 Jan 2015 06:25:58 +0000 (15:25 +0900)
committerHAMANO Tsukasa <code@cuspy.org>
Mon, 19 Jan 2015 06:25:58 +0000 (15:25 +0900)
src/cyrsasl_scram.erl

index 26e03700192c3b1717950888bf6b18bf5cc16096..8516b1734c61e15cb8b99249c468208da0221cf5 100644 (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;