Author: andar

Revision: 5084

Log:
        Fix some uncaught exceptions if the session is not authorized

Diff:
Modified: trunk/deluge/core/rpcserver.py
===================================================================
--- trunk/deluge/core/rpcserver.py      2009-04-18 18:14:57 UTC (rev 5083)
+++ trunk/deluge/core/rpcserver.py      2009-04-18 18:19:47 UTC (rev 5084)
@@ -231,7 +231,7 @@
                     self.transport.loseConnection()
             finally:
                 return
-        elif method == "daemon.set_event_interest":
+        elif method == "daemon.set_event_interest" and 
self.transport.sessionno in self.factory.authorized_sessions:
             # This special case is to allow clients to set which events they 
are
             # interested in receiving.
             # We are expecting a sequence from the client.
@@ -246,7 +246,7 @@
             finally:
                 return
 
-        if method in self.factory.methods:
+        if method in self.factory.methods and self.transport.sessionno in 
self.factory.authorized_sessions:
             try:
                 method_auth_requirement = 
self.factory.methods[method]._rpcserver_auth_level
                 auth_level = 
self.factory.authorized_sessions[self.transport.sessionno]



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to