mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 11:09:56 +00:00
Fixed Issue 93: ACL.check jid parameter should be a string value
This commit is contained in:
parent
d496417deb
commit
c98a22e065
1 changed files with 3 additions and 0 deletions
|
@ -113,6 +113,9 @@ class ACL:
|
||||||
def check(cls, rules, jid, resource):
|
def check(cls, rules, jid, resource):
|
||||||
if rules is None:
|
if rules is None:
|
||||||
return cls.DENY # No rules means no access!
|
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:
|
for rule in rules:
|
||||||
policy = cls._check(rule, jid, resource)
|
policy = cls._check(rule, jid, resource)
|
||||||
if policy is not None:
|
if policy is not None:
|
||||||
|
|
Loading…
Reference in a new issue