deprecate MD5 in favor of SHA512

This commit is contained in:
Matt Hamilton 2016-08-22 14:31:13 -07:00
parent 80a1f2e546
commit d872c0a80f
2 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ class SyncplayClient(object):
self.setUsername(config['name']) self.setUsername(config['name'])
self.setRoom(config['room']) self.setRoom(config['room'])
if config['password']: if config['password']:
config['password'] = hashlib.md5(config['password']).hexdigest() config['password'] = hashlib.sha512(config['password']).hexdigest()
self._serverPassword = config['password'] self._serverPassword = config['password']
if not config['file']: if not config['file']:
self.__getUserlistOnLogon = True self.__getUserlistOnLogon = True

View File

@ -17,7 +17,7 @@ class SyncFactory(Factory):
def __init__(self, password='', motdFilePath=None, isolateRooms=False, salt=None, disableReady=False): def __init__(self, password='', motdFilePath=None, isolateRooms=False, salt=None, disableReady=False):
print getMessage("welcome-server-notification").format(syncplay.version) print getMessage("welcome-server-notification").format(syncplay.version)
if password: if password:
password = hashlib.md5(password).hexdigest() password = hashlib.sha512(password).hexdigest()
self.password = password self.password = password
if salt is None: if salt is None:
salt = RandomStringGenerator.generate_server_salt() salt = RandomStringGenerator.generate_server_salt()