From 8684356b4486f77bc7c49dd5e08620d2a20aa975 Mon Sep 17 00:00:00 2001 From: mrmajik45 <35823544+mrmajik45@users.noreply.github.com> Date: Wed, 26 Sep 2018 10:31:44 -0400 Subject: [PATCH 1/3] read without -r will mangle backslashes. --- advanced/Scripts/webpage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index c3dede05..283e60d5 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -110,7 +110,7 @@ SetWebPassword() { # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed. # So we reset the terminal via stty if the user does press Ctrl+C trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT - read -s -p "Enter New Password (Blank for no password): " PASSWORD + read -s -p -r "Enter New Password (Blank for no password): " PASSWORD echo "" if [ "${PASSWORD}" == "" ]; then @@ -119,7 +119,7 @@ SetWebPassword() { exit 0 fi - read -s -p "Confirm Password: " CONFIRM + read -s -p -r "Confirm Password: " CONFIRM echo "" fi From 00f98543ad6835527fd170d535fe6d295bdae69a Mon Sep 17 00:00:00 2001 From: mrmajik45 <35823544+mrmajik45@users.noreply.github.com> Date: Wed, 26 Sep 2018 10:32:22 -0400 Subject: [PATCH 2/3] read without -r will mangle backslashes. --- advanced/Scripts/piholeDebug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index b8377f73..4ef0e935 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -907,7 +907,7 @@ parse_file() { #shellcheck disable=SC2016 IFS=$'\r\n' command eval 'file_info=( $(cat "${filename}") )' else - read -a file_info <<< $filename + read -a -r file_info <<< $filename fi # Set a named variable for better readability local file_lines From 0f509f4a34f103730a79e5225cea8d4a4762d357 Mon Sep 17 00:00:00 2001 From: mrmajik45 <35823544+mrmajik45@users.noreply.github.com> Date: Fri, 28 Sep 2018 17:22:31 -0400 Subject: [PATCH 3/3] Update piholeDebug.sh --- advanced/Scripts/piholeDebug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 4ef0e935..022265fd 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -907,7 +907,7 @@ parse_file() { #shellcheck disable=SC2016 IFS=$'\r\n' command eval 'file_info=( $(cat "${filename}") )' else - read -a -r file_info <<< $filename + read -a -r file_info <<< "$filename" fi # Set a named variable for better readability local file_lines