Fixed hashed password encoding

pull/2/head
Illia Chub 2021-10-11 13:57:21 +03:00
parent ffe89b6983
commit 1330e1c202
1 changed files with 1 additions and 0 deletions

View File

@ -74,6 +74,7 @@ def createUser():
rawPassword = request.headers.get("X-Password")
passwordHashProcessDescriptor = subprocess.Popen(["mkpasswd", "-m", "sha-512", "\"", rawPassword, "\""], shell=True, stdout=subprocess.PIPE)
hashedPassword = passwordHashProcessDescriptor.communicate()[0]
hashedPassword = hashedPassword.decode("ascii")
print("[TRACE] {0}".format(hashedPassword))