From 8a413018c2c1c341df0f3c8b47c5a001d9065250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 21 Jan 2009 12:44:36 +0000 Subject: [PATCH] In match_acl/3, use string() version of User/Server/Resource to match an ACL. PR: EJABP-1 SVN Revision: 1837 --- ChangeLog | 5 +++++ src/acl.erl | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6cc41b2dc..988146db7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-21 Jean-Sébastien Pédron + + * src/acl.erl (match_acl/3): Use string() version of + User/Server/Resource to match an ACL. + 2009-01-19 Pablo Polvorin * src/cyrsasl_digest.erl: Typo (prolists -> proplists). diff --git a/src/acl.erl b/src/acl.erl index b72402c4d..aa672b4bf 100644 --- a/src/acl.erl +++ b/src/acl.erl @@ -158,7 +158,9 @@ match_acl(ACL, JID, Host) -> all -> true; none -> false; _ -> - {User, Server, Resource} = jlib:short_prepd_jid(JID), + User = exmpp_jid:lnode_as_list(JID), + Server = exmpp_jid:ldomain_as_list(JID), + Resource = exmpp_jid:lresource_as_list(JID), lists:any(fun(#acl{aclspec = Spec}) -> case Spec of all ->