diff options
| author | Mickaël Rémond <mremond@process-one.net> | 2016-07-30 10:55:39 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-30 10:55:39 +0200 | 
| commit | 4a49dfecf38889903556b7b49da09858b44e9a7a (patch) | |
| tree | b2cdd7c152117fd8500fa5540d1cc92f71a177aa | |
| parent | Merge pull request #1178 from candrews/patch-1 (diff) | |
| parent | Do not crash on check when we do not have JID (diff) | |
Merge pull request #1221 from processone/expand_api
Do not crash on check when we do not have JID
| -rw-r--r-- | src/ejabberd_commands.erl | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 33edcb7c7..2c095440f 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -555,6 +555,8 @@ execute_check_policy(  execute_check_access(_FromJID, #ejabberd_commands{access = []} = Command, Arguments) ->      do_execute_command(Command, Arguments); +execute_check_access(undefined, _Command, _Arguments) -> +    throw({error, access_rules_unauthorized});  execute_check_access(FromJID, #ejabberd_commands{access = AccessRefs} = Command, Arguments) ->      %% TODO Review: Do we have smarter / better way to check rule on other Host than global ?      Host = global,  | 
