diff --git a/main.py b/main.py index 26a1934..620623f 100755 --- a/main.py +++ b/main.py @@ -72,7 +72,7 @@ def upgradeSystem(): def createUser(): 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 = hashedPassword.decode("ascii")