From 303087aeafb26f44efea004809b90d71cac8d97a Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 31 May 2021 20:15:33 +0200 Subject: [PATCH] Fix reading encryption keys beginning with whitespace --- scripts/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index 5ab5f6d..4aeda6e 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -97,7 +97,7 @@ function check_encryption_key() { while true; do flush_stdin - read -s -r -p "Enter encryption key: " encryption_key_1 \ + IFS="" read -s -r -p "Enter encryption key: " encryption_key_1 \ || die "Error in read" echo @@ -105,7 +105,7 @@ function check_encryption_key() { || { ewarn "Your encryption key must be at least 8 characters long."; continue; } flush_stdin - read -s -r -p "Repeat encryption key: " encryption_key_2 \ + IFS="" read -s -r -p "Repeat encryption key: " encryption_key_2 \ || die "Error in read" echo