mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-23 04:21:29 +00:00
Rewritten password hashing logic
This commit is contained in:
parent
1bfa887e6b
commit
a1292232a7
2
main.py
2
main.py
|
@ -72,7 +72,7 @@ def upgradeSystem():
|
||||||
def createUser():
|
def createUser():
|
||||||
|
|
||||||
rawPassword = request.headers.get("X-Password")
|
rawPassword = request.headers.get("X-Password")
|
||||||
passwordHashProcessDescriptor = subprocess.Popen(["mkpasswd", "-m", "sha-512", "\"", rawPassword, "\""], shell=True)
|
passwordHashProcessDescriptor = subprocess.Popen(["mkpasswd -m sha-512 \"" + rawPassword + "\"", shell=True, stdout=subprocess.PIPE, stderr=STDOUT)
|
||||||
hashedPassword = passwordHashProcessDescriptor.communicate()[0]
|
hashedPassword = passwordHashProcessDescriptor.communicate()[0]
|
||||||
hashedPassword = hashedPassword.decode("ascii")
|
hashedPassword = hashedPassword.decode("ascii")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue