changeset 2084:5e0c667c79cb

Don't inherit SimpleXMLRPCServer, it's dangerous.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Sat, 02 Jun 2007 19:17:52 +0200
parents 9c66c85a6a70
children d72f126157f7
files MoinMoin/jabber/xmlrpcbot.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/jabber/xmlrpcbot.py	Sat Jun 02 19:15:18 2007 +0200
+++ b/MoinMoin/jabber/xmlrpcbot.py	Sat Jun 02 19:17:52 2007 +0200
@@ -40,7 +40,7 @@
         """Starts the server / thread"""
         pass
 
-class XMLRPCServer(Thread, SimpleXMLRPCServer):
+class XMLRPCServer(Thread):
     """XMLRPC Server
     
     It waits for notifications requests coming from wiki,
@@ -54,13 +54,13 @@
         Thread.__init__(self)
         self.commands = commands
         self.verbose = config.verbose
-        SimpleXMLRPCServer.__init__(self, (config.xmlrpc_host, config.xmlrpc_port))
+        self.server = SimpleXMLRPCServer((config.xmlrpc_host, config.xmlrpc_port))
         
     def run(self):
         """Starts the server / thread"""
         
-        self.register_function(self.send_notification)
-        self.serve_forever()
+        self.server.register_function(self.send_notification)
+        self.server.serve_forever()
         
     def log(self, message):
         """Logs a message and its timestamp"""