From 4c6300495404f1423a199f55d5bc73c4e112441e Mon Sep 17 00:00:00 2001 From: Illia Chub Date: Tue, 12 Oct 2021 11:31:01 +0300 Subject: [PATCH] Fixed syntax issues --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 890fdc8..4ea7801 100755 --- a/main.py +++ b/main.py @@ -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")