changeset 216:53d2c0019458

Fix subscription and unsubscription JID checks.
author Ralph Meijer <ralphm@ik.nu>
date Thu, 03 Sep 2009 16:27:32 +0000
parents aecfacb5a571
children f94c3eb38b75
files idavoll/backend.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/idavoll/backend.py	Thu Jun 18 13:11:59 2009 +0000
+++ b/idavoll/backend.py	Thu Sep 03 16:27:32 2009 +0000
@@ -222,7 +222,7 @@
 
     def subscribe(self, nodeIdentifier, subscriber, requestor):
         subscriberEntity = subscriber.userhostJID()
-        if subscriberEntity != requestor:
+        if subscriberEntity != requestor.userhostJID():
             return defer.fail(error.Forbidden())
 
         d = self.storage.getNode(nodeIdentifier)
@@ -276,7 +276,7 @@
 
 
     def unsubscribe(self, nodeIdentifier, subscriber, requestor):
-        if subscriber.userhostJID() != requestor:
+        if subscriber.userhostJID() != requestor.userhostJID():
             return defer.fail(error.Forbidden())
 
         d = self.storage.getNode(nodeIdentifier)