aboutsummaryrefslogtreecommitdiff
path: root/src/cyrsasl_anonymous.erl
diff options
context:
space:
mode:
authorMickael Remond <mremond@process-one.net>2016-04-12 10:34:24 +0200
committerMickael Remond <mremond@process-one.net>2016-04-12 10:34:24 +0200
commitcd2e2b1a880f93b7198bbc17cb1d9be2c23048e8 (patch)
treece38fa8eac3e4540e4792d39f059f6f04a4fab9b /src/cyrsasl_anonymous.erl
parentAllow testing user pattern directly in access rules (diff)
Synchronizing master changes
Diffstat (limited to 'src/cyrsasl_anonymous.erl')
-rw-r--r--src/cyrsasl_anonymous.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cyrsasl_anonymous.erl b/src/cyrsasl_anonymous.erl
index 2b2a9f63c..802e1cd7b 100644
--- a/src/cyrsasl_anonymous.erl
+++ b/src/cyrsasl_anonymous.erl
@@ -45,9 +45,8 @@ mech_new(Host, _GetPassword, _CheckPassword, _CheckPasswordDigest) ->
mech_step(#state{server = Server} = S, ClientIn) ->
User = iolist_to_binary([randoms:get_string(),
- randoms:get_string(),
- randoms:get_string()]),
+ jlib:integer_to_binary(p1_time_compat:unique_integer([positive]))]),
case ejabberd_auth:is_user_exists(User, Server) of
true -> mech_step(S, ClientIn);
- false -> {ok, [{username, User}, {auth_module, ejabberd_auth_anonymous}]}
+ false -> {ok, [{username, User}, {authzid, User}, {auth_module, ejabberd_auth_anonymous}]}
end.