iro/xmlrpc/SecureUserdbXMLRPCServer.py
changeset 69 67ecea2d9b67
parent 67 d1912509f375
--- a/iro/xmlrpc/SecureUserdbXMLRPCServer.py	Thu Nov 03 22:47:30 2011 +0100
+++ b/iro/xmlrpc/SecureUserdbXMLRPCServer.py	Fri Nov 18 22:36:50 2011 +0100
@@ -1,6 +1,6 @@
 from SecureAuthentificateXMLRPCServer import  SecureAuthentificateXMLRPCRequestHandler
 from SecureXMLRPCServer import SecureXMLRPCServer
-import os, md5
+import os, hashlib
 
 class UserDB:
     '''
@@ -20,14 +20,14 @@
         returns a hash out of username and the password and self.salt
         user is a directory with two keys: username and password
         """
-        m=md5.new()
+        m=hashlib.sha512()
         m.update(user["name"])
         m.update(self.salt)
         m.update(user["password"])
         return m.hexdigest()
 
     def createUser(self,user):
-        self.userlist[self.createHash(user)]=self.userClass(self.jobqueue)
+        self.userlist[self.createHash(user)]=self.userClass(user["name"],self.jobqueue)
 
     def __getitem__(self,key):
         return self.userlist[key]