summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-12-15 16:14:29 -0800
committerLance Stout <lancestout@gmail.com>2011-12-15 16:14:29 -0800
commita67e16d1b70c15e0fc8674d57280f41af8fb71c3 (patch)
treeb38a41df25d1e22b960f82c6296a038f0dd26822 /sleekxmpp/plugins
parentd496417deb5a2c87fe8ad639e82d2b19ce94fc30 (diff)
parentc98a22e065e81b5e01762e4eeedecb796a3954e1 (diff)
downloadslixmpp-a67e16d1b70c15e0fc8674d57280f41af8fb71c3.tar.gz
slixmpp-a67e16d1b70c15e0fc8674d57280f41af8fb71c3.tar.bz2
slixmpp-a67e16d1b70c15e0fc8674d57280f41af8fb71c3.tar.xz
slixmpp-a67e16d1b70c15e0fc8674d57280f41af8fb71c3.zip
Merge pull request #122 from correl/acl_check_fix
XEP-0009: ACL.check fix
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0009/remote.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0009/remote.py b/sleekxmpp/plugins/xep_0009/remote.py
index 1e3b504a..8c08e8f3 100644
--- a/sleekxmpp/plugins/xep_0009/remote.py
+++ b/sleekxmpp/plugins/xep_0009/remote.py
@@ -113,6 +113,9 @@ class ACL:
def check(cls, rules, jid, resource):
if rules is None:
return cls.DENY # No rules means no access!
+ jid = str(jid) # Check the string representation of the JID.
+ if not jid:
+ return cls.DENY # Can't check an empty JID.
for rule in rules:
policy = cls._check(rule, jid, resource)
if policy is not None: