Fixed syntax issues

pull/2/head
Illia Chub 2021-10-12 11:31:01 +03:00
parent ef79004f19
commit 4c63004954
1 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,10 @@ def upgradeSystem():
def createUser():
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 = hashedPassword.decode("ascii")