mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Merge pull request #2426 from mrmajik45/master
Read without -r will mangle backslashes. (Fix)
This commit is contained in:
commit
cedc39bf09
@ -907,7 +907,7 @@ parse_file() {
|
|||||||
#shellcheck disable=SC2016
|
#shellcheck disable=SC2016
|
||||||
IFS=$'\r\n' command eval 'file_info=( $(cat "${filename}") )'
|
IFS=$'\r\n' command eval 'file_info=( $(cat "${filename}") )'
|
||||||
else
|
else
|
||||||
read -a file_info <<< $filename
|
read -a -r file_info <<< "$filename"
|
||||||
fi
|
fi
|
||||||
# Set a named variable for better readability
|
# Set a named variable for better readability
|
||||||
local file_lines
|
local file_lines
|
||||||
|
@ -110,7 +110,7 @@ SetWebPassword() {
|
|||||||
# Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed.
|
# 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
|
# 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
|
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 ""
|
echo ""
|
||||||
|
|
||||||
if [ "${PASSWORD}" == "" ]; then
|
if [ "${PASSWORD}" == "" ]; then
|
||||||
@ -119,7 +119,7 @@ SetWebPassword() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -s -p "Confirm Password: " CONFIRM
|
read -s -p -r "Confirm Password: " CONFIRM
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user