aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2015-04-17 20:21:11 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2015-04-17 20:21:11 +0200
commitc01940f33c1b94b8ed629e1e39ef98561e705a10 (patch)
tree7c556fb1fc69733c611cdf881af331165a67aa70
parentejabberd_s2s_out: Remove Erlang/OTP version check (diff)
cyrsasl_scram: Return user name with error message
Let ejabberd_c2s run the 'c2s_auth_result' hook (which needs the user name) on SCRAM authentication failure.
-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 1fd7c1be5..deef51c57 100644
--- a/src/cyrsasl_scram.erl
+++ b/src/cyrsasl_scram.erl
@@ -160,7 +160,7 @@ mech_step(#state{step = 4} = State, ClientIn) ->
{ok, [{username, State#state.username}],
<<"v=",
(jlib:encode_base64(ServerSignature))/binary>>};
- true -> {error, <<"bad-auth">>}
+ true -> {error, <<"bad-auth">>, State#state.username}
end;
_Else -> {error, <<"bad-protocol">>}
end;