Skip to content

Commit

Permalink
Generate shorted jid for anonymous connections
Browse files Browse the repository at this point in the history
  • Loading branch information
prefiks committed Apr 7, 2016
1 parent 0935f49 commit afd3acc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cyrsasl_anonymous.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ 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}, {authzid, User}, {auth_module, ejabberd_auth_anonymous}]}
Expand Down

0 comments on commit afd3acc

Please sign in to comment.