25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix login when generating client id, keep connection record (#3593)

This commit is contained in:
Badlop 2022-01-11 17:19:12 +01:00
parent 9ba20d26cb
commit 03a11c63bd

View File

@ -1134,8 +1134,8 @@ is_expired(#publish{meta = Meta, properties = Props} = Pkt) ->
%%% Authentication
%%%===================================================================
-spec parse_credentials(connect()) -> {ok, jid:jid()} | {error, reason_code()}.
parse_credentials(#connect{client_id = <<>>}) ->
parse_credentials(#connect{client_id = p1_rand:get_string()});
parse_credentials(#connect{client_id = <<>>} = C) ->
parse_credentials(C#connect{client_id = p1_rand:get_string()});
parse_credentials(#connect{username = <<>>, client_id = ClientID}) ->
Host = ejabberd_config:get_myname(),
JID = case jid:make(ClientID, Host) of