bug fix: ftp

This commit is contained in:
Usman Nasir
2019-12-17 13:58:51 +05:00
parent 09d05ad5cb
commit fc622d9bdd

View File

@@ -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()