From 1307479efd0a2dbc93f1e318a7dde3dbd9d1d8a3 Mon Sep 17 00:00:00 2001 From: axtloss Date: Tue, 26 Jul 2022 15:28:28 +0200 Subject: [PATCH] Fix password encryption method --- src/functions/install_screen.py | 5 ++++- src/functions/user_screen.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/functions/install_screen.py b/src/functions/install_screen.py index ec04e23..6c3ad59 100644 --- a/src/functions/install_screen.py +++ b/src/functions/install_screen.py @@ -38,7 +38,10 @@ class InstallScreen(Adw.Bin): process = subprocess.Popen(["bash", "-c", "bash -- /app/share/jade_gui/jade_gui/scripts/install.sh"], stdout=subprocess.PIPE) for c in iter(lambda: process.stdout.read(1), b""): log=c - GLib.idle_add(self.update_output, c.decode("utf-8")) + try: + GLib.idle_add(self.update_output, c.decode("utf-8")) + except: + pass f.write(c) def update_output(self, message): diff --git a/src/functions/user_screen.py b/src/functions/user_screen.py index aa8f2b2..ed2e0a7 100644 --- a/src/functions/user_screen.py +++ b/src/functions/user_screen.py @@ -101,7 +101,7 @@ class UserScreen(Adw.Bin): self.password_confirmation.add_css_class('error') def encrypt_password(self, password): - command=subprocess.run(["openssl", "passwd", "-6", password], capture_output=True) + command=subprocess.run(["openssl", "passwd", "-crypt", password], capture_output=True) password_encrypted=command.stdout.decode('utf-8').strip('\n') return password_encrypted