diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2016-04-07 16:47:30 +0200 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2016-04-07 16:47:30 +0200 |
commit | afd3accf751a0ac70e4435c973a5a3eab7afb0c5 (patch) | |
tree | ae9521e1e9ab0ac33b72541b61d20664f8ebb36c /src | |
parent | Add tests for anonymous and digest-md5 auth (diff) |
Generate shorted jid for anonymous connections
Diffstat (limited to 'src')
-rw-r--r-- | src/cyrsasl_anonymous.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cyrsasl_anonymous.erl b/src/cyrsasl_anonymous.erl index 6aea278c..802e1cd7 100644 --- a/src/cyrsasl_anonymous.erl +++ b/src/cyrsasl_anonymous.erl @@ -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}]} |