]> granicus.if.org Git - ejabberd/commitdiff
More strict check for commands with policy user
authorPaweł Chmielowski <pchmielowski@process-one.net>
Mon, 30 May 2016 21:03:38 +0000 (23:03 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Mon, 30 May 2016 21:06:29 +0000 (23:06 +0200)
src/ejabberd_commands.erl

index 543e27ca19d4cdec4a652697e455157ca8b1d6f4..1b7d777e64b0fd5bbe098bc547c71a3e202c0eda 100644 (file)
@@ -656,7 +656,12 @@ check_access(Command, Access, Auth, CallerInfo)
        {ok, User, Server} ->
            check_access2(Access, CallerInfo#{usr => jid:split(jid:make(User, Server, <<>>))}, Server);
        no_auth_provided ->
-           check_access2(Access, CallerInfo, global);
+           case Command#ejabberd_commands.policy of
+               user ->
+                   false;
+               _ ->
+                   check_access2(Access, CallerInfo, global)
+           end;
        _ ->
            false
     end;