mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-10-01 04:22:54 +00:00
Fixed syntax issues
This commit is contained in:
parent
ef79004f19
commit
4c63004954
5
main.py
5
main.py
|
@ -72,7 +72,10 @@ 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, stdout=subprocess.PIPE, stderr=STDOUT)
|
hashingCommand = '''
|
||||||
|
mkpasswd -m sha-512 {0}
|
||||||
|
'''.format(rawPassword)
|
||||||
|
passwordHashProcessDescriptor = subprocess.Popen([hashingCommand, 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