From d5f90965d72d617fd8cc604f78c530a50ec48087 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 24 Mar 2014 19:40:55 +0100 Subject: [PATCH] Fix ACLs syntax change (thanks to jokker23)(issue #140) --- src/acl.erl | 2 ++ src/ejabberd_web_admin.erl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/acl.erl b/src/acl.erl index 32c743ede..809d6ff33 100644 --- a/src/acl.erl +++ b/src/acl.erl @@ -237,6 +237,8 @@ normalize_spec(Spec) -> {server_regexp, SR} -> {server_regexp, b(SR)}; {server_glob, S} -> {server_glob, b(S)}; {resource_glob, R} -> {resource_glob, b(R)}; + {ip, {Net, Mask}} -> + {ip, {Net, Mask}}; {ip, S} -> case parse_ip_netmask(b(S)) of {ok, Net, Mask} -> diff --git a/src/ejabberd_web_admin.erl b/src/ejabberd_web_admin.erl index c8974e637..9f5a5f08f 100644 --- a/src/ejabberd_web_admin.erl +++ b/src/ejabberd_web_admin.erl @@ -1138,7 +1138,7 @@ string_to_spec2(ACLName, Val) -> jlib:string_to_jid(Val), case U of <<"">> -> {ACLName, S}; - _ -> {ACLName, U, S} + _ -> {ACLName, {U, S}} end. acl_parse_delete(ACLs, Query) -> -- 2.40.0