From a345f4181cfd0803301b86b98b30e9e97be4e240 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 4 Jan 2024 13:56:26 -0500 Subject: [PATCH] Fix multi-word device IDs being unable to verify via quick-unlock --- lib/sshyp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index 98ed4dc..fe3e482 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -193,8 +193,9 @@ def whitelist_verify(_port, _username_ssh, _ip, _client_device_id, _identity): except CalledProcessError: _i, _full_password = 0, '' _server_whitelist = run(('ssh', '-i', _identity, '-p', _port, f"{_username_ssh}@{_ip}", - f'python3 -c \'from os import listdir; print(*listdir("/home/{_username_ssh}' - f'/.config/sshyp/whitelist"))\''), stdout=PIPE, text=True).stdout.rstrip().split() + f'python3 -c \'from os import listdir; print(listdir("/home/{_username_ssh}' + f'/.config/sshyp/whitelist"))\''), + stdout=PIPE, text=True).stdout.rstrip()[2:-2].split("', '") for _device_id in _server_whitelist: if _device_id == _client_device_id: from getpass import getpass