From a0c8012c66cce3f01562edc4d5708fdbb6a7f76f Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Sun, 7 Aug 2016 18:24:08 +0200 Subject: [PATCH] Do not force command line to pass a credentials --- src/ejabberd_commands.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index a8b3e25ab..7110410f1 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -537,6 +537,9 @@ execute_command(AccessCommands1, Auth1, Name, Arguments, Version, CallerInfo) -> execute_check_policy( _Auth, _JID, #ejabberd_commands{policy = open} = Command, Arguments) -> do_execute_command(Command, Arguments); +execute_check_policy( + noauth, _JID, Command, Arguments) -> + do_execute_command(Command, Arguments); execute_check_policy( _Auth, _JID, #ejabberd_commands{policy = restricted} = Command, Arguments) -> do_execute_command(Command, Arguments); @@ -546,9 +549,6 @@ execute_check_policy( execute_check_policy( admin, JID, #ejabberd_commands{policy = user} = Command, Arguments) -> execute_check_access(JID, Command, Arguments); -execute_check_policy( - noauth, _JID, #ejabberd_commands{policy = user} = Command, Arguments) -> - do_execute_command(Command, Arguments); execute_check_policy( {User, Server, _, _}, JID, #ejabberd_commands{policy = user} = Command, Arguments) -> execute_check_access(JID, Command, [User, Server | Arguments]).