mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-17 08:02:36 +00:00
Fixed hashed password encoding
This commit is contained in:
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 a new issue