From fc622d9bdd73d50afcbabea435755848233e163f Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 17 Dec 2019 13:58:51 +0500 Subject: [PATCH] bug fix: ftp --- plogical/ftpUtilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plogical/ftpUtilities.py b/plogical/ftpUtilities.py index d38b0d65c..7c72131ca 100755 --- a/plogical/ftpUtilities.py +++ b/plogical/ftpUtilities.py @@ -144,7 +144,7 @@ class FTPUtilities: return 0 hash = hashlib.md5() - hash.update(password) + hash.update(password.encode('utf-8')) admin = Administrator.objects.get(userName=owner) @@ -196,7 +196,7 @@ class FTPUtilities: def changeFTPPassword(userName, password): try: hash = hashlib.md5() - hash.update(password) + hash.update(password.encode('utf-8')) ftp = Users.objects.get(user=userName) ftp.password = hash.hexdigest()