From 7e35dc37bab01c5cbb567bd62632d5f296a0cc29 Mon Sep 17 00:00:00 2001 From: Jusung Lee Date: Sun, 21 Dec 2025 10:20:59 -0500 Subject: [PATCH] replace plaintext password prompt with obfuscation and show censored password during confirmation --- setup.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index f205358..77868cc 100755 --- a/setup.sh +++ b/setup.sh @@ -109,11 +109,25 @@ build_command() { bb_url=${DEFAULT_BB_URL} ;; esac - read -p "Please enter your BlueBubbles password: " bb_pass - echo + + while true; do + echo "Please enter your BlueBubbles password: " + read -s bb_pass + echo + echo "Please reenter your BlueBubbles password: " + read -s bb_pass_confirm + echo + if [ "${bb_pass}" != "${bb_pass_confirm}" ]; then + echo "Passwords do not match. Please try again." + echo + else + break + fi + done + echo "This is what I've got:" echo "BlueBubbles URL: ${bb_url}" - echo "BlueBubbles Password: ${bb_pass}" + echo "BlueBubbles Password: ${bb_pass//?/*}" read -r -p "Does that look correct? [Y/n] " -n 1 case "$REPLY" in n | N)