diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-02-25 10:01:01 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-02-25 10:01:01 +0300 |
commit | 603ec9cb19ec8664ca75dd74b1cb3541878a27da (patch) | |
tree | 89e0802baeeda5859938e089733d2d426746cfbf /src/ejabberd_commands.erl | |
parent | Don't pass 'from' and 'to' along with stanza in hooks' arguments (diff) |
Don't pass empty resource to jid:make()
Diffstat (limited to '')
-rw-r--r-- | src/ejabberd_commands.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 9bfa94dd6..f56cfc146 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -731,7 +731,7 @@ check_access(Command, Access, Auth, CallerInfo) Command#ejabberd_commands.policy == user -> case check_auth(Command, Auth) of {ok, User, Server} -> - check_access2(Access, CallerInfo#{usr => jid:split(jid:make(User, Server, <<>>))}, Server); + check_access2(Access, CallerInfo#{usr => jid:split(jid:make(User, Server))}, Server); no_auth_provided -> case Command#ejabberd_commands.policy of user -> @@ -834,7 +834,7 @@ oauth_token_user(noauth) -> oauth_token_user(admin) -> undefined; oauth_token_user({User, Server, _, _}) -> - jid:make(User, Server, <<>>). + jid:make(User, Server). is_admin(_Name, admin, _Extra) -> true; @@ -845,7 +845,7 @@ is_admin(_Name, Map, _extra) when is_map(Map) -> is_admin(Name, Auth, Extra) -> {ACLInfo, Server} = case Auth of {U, S, _, _} -> - {Extra#{usr=>jid:split(jid:make(U, S, <<>>))}, S}; + {Extra#{usr=>jid:split(jid:make(U, S))}, S}; _ -> {Extra, global} end, |