Fixed hashed password encoding
parent
ffe89b6983
commit
1330e1c202
1
main.py
1
main.py
|
@ -74,6 +74,7 @@ def createUser():
|
||||||
rawPassword = request.headers.get("X-Password")
|
rawPassword = request.headers.get("X-Password")
|
||||||
passwordHashProcessDescriptor = subprocess.Popen(["mkpasswd", "-m", "sha-512", "\"", rawPassword, "\""], shell=True, stdout=subprocess.PIPE)
|
passwordHashProcessDescriptor = subprocess.Popen(["mkpasswd", "-m", "sha-512", "\"", rawPassword, "\""], shell=True, stdout=subprocess.PIPE)
|
||||||
hashedPassword = passwordHashProcessDescriptor.communicate()[0]
|
hashedPassword = passwordHashProcessDescriptor.communicate()[0]
|
||||||
|
hashedPassword = hashedPassword.decode("ascii")
|
||||||
|
|
||||||
print("[TRACE] {0}".format(hashedPassword))
|
print("[TRACE] {0}".format(hashedPassword))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue