From d872c0a80fc5c7f07c7afb07ef40636f454eb69a Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Mon, 22 Aug 2016 14:31:13 -0700 Subject: [PATCH] deprecate MD5 in favor of SHA512 --- syncplay/client.py | 4 ++-- syncplay/server.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index 2f52014..dacb736 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -88,7 +88,7 @@ class SyncplayClient(object): self.setUsername(config['name']) self.setRoom(config['room']) if config['password']: - config['password'] = hashlib.md5(config['password']).hexdigest() + config['password'] = hashlib.sha512(config['password']).hexdigest() self._serverPassword = config['password'] if not config['file']: self.__getUserlistOnLogon = True @@ -1768,4 +1768,4 @@ class FileSwitchManager(object): if self.isDirectoryInList(directoryToFind, self.mediaDirectories): return self._client.ui.showErrorMessage(getMessage("added-file-not-in-media-directory-error").format(directoryToFind)) - self.mediaDirectoriesNotFound.append(directoryToFind) \ No newline at end of file + self.mediaDirectoriesNotFound.append(directoryToFind) diff --git a/syncplay/server.py b/syncplay/server.py index c177338..b7a0c85 100644 --- a/syncplay/server.py +++ b/syncplay/server.py @@ -17,7 +17,7 @@ class SyncFactory(Factory): def __init__(self, password='', motdFilePath=None, isolateRooms=False, salt=None, disableReady=False): print getMessage("welcome-server-notification").format(syncplay.version) if password: - password = hashlib.md5(password).hexdigest() + password = hashlib.sha512(password).hexdigest() self.password = password if salt is None: salt = RandomStringGenerator.generate_server_salt()