1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-23 07:18:07 +00:00

Merge pull request #1780 from pi-hole/fix/spacepasswd

Allow passwords with spaces
This commit is contained in:
Jacob Salmela 2017-11-23 23:42:54 -06:00 committed by GitHub
commit 90f01b5fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 12 deletions

View File

@ -110,7 +110,7 @@ SetWebPassword() {
fi fi
if [ "${PASSWORD}" == "${CONFIRM}" ] ; then if [ "${PASSWORD}" == "${CONFIRM}" ] ; then
hash=$(HashPassword ${PASSWORD}) hash=$(HashPassword "${PASSWORD}")
# Save hash to file # Save hash to file
change_setting "WEBPASSWORD" "${hash}" change_setting "WEBPASSWORD" "${hash}"
echo -e " ${TICK} New password set" echo -e " ${TICK} New password set"

View File

@ -218,7 +218,7 @@ elif command -v rpm &> /dev/null; then
LIGHTTPD_CFG="lighttpd.conf.fedora" LIGHTTPD_CFG="lighttpd.conf.fedora"
DNSMASQ_USER="nobody" DNSMASQ_USER="nobody"
# If neither apt-get or rmp/dnf are not found # If neither apt-get or rmp/dnf are found
else else
# it's not an OS we can support, # it's not an OS we can support,
echo -e " ${CROSS} OS distribution not supported" echo -e " ${CROSS} OS distribution not supported"
@ -764,9 +764,10 @@ setDNS() {
Norton "" Norton ""
Comodo "" Comodo ""
DNSWatch "" DNSWatch ""
Quad9 ""
Custom "") Custom "")
# In a whiptail dialog, show the options # In a whiptail dialog, show the options
DNSchoices=$(whiptail --separate-output --menu "Select Upstream DNS Provider. To use your own, select Custom." ${r} ${c} 6 \ DNSchoices=$(whiptail --separate-output --menu "Select Upstream DNS Provider. To use your own, select Custom." ${r} ${c} 7 \
"${DNSChooseOptions[@]}" 2>&1 >/dev/tty) || \ "${DNSChooseOptions[@]}" 2>&1 >/dev/tty) || \
# exit if Cancel is selected # exit if Cancel is selected
{ echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}"; exit 1; } { echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}"; exit 1; }
@ -805,6 +806,10 @@ setDNS() {
PIHOLE_DNS_1="84.200.69.80" PIHOLE_DNS_1="84.200.69.80"
PIHOLE_DNS_2="84.200.70.40" PIHOLE_DNS_2="84.200.70.40"
;; ;;
Quad9)
echo "Quad9 servers"
PIHOLE_DNS_1="9.9.9.9"
;;
Custom) Custom)
# Until the DNS settings are selected, # Until the DNS settings are selected,
until [[ "${DNSSettingsCorrect}" = True ]]; do until [[ "${DNSSettingsCorrect}" = True ]]; do
@ -1670,14 +1675,14 @@ update_dialogs() {
"${opt2a}" "${opt2b}" 3>&2 2>&1 1>&3) || \ "${opt2a}" "${opt2b}" 3>&2 2>&1 1>&3) || \
{ echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}"; exit 1; } { echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}"; exit 1; }
# Set the variable based on if the user user chooses # Set the variable based on if the user chooses
case ${UpdateCmd} in case ${UpdateCmd} in
# repair, or # repair, or
${opt1a}) ${opt1a})
echo -e " ${INFO} ${opt1a} option selected" echo -e " ${INFO} ${opt1a} option selected"
useUpdateVars=true useUpdateVars=true
;; ;;
# recongigure, # reconfigure,
${opt2a}) ${opt2a})
echo -e " ${INFO} ${opt2a} option selected" echo -e " ${INFO} ${opt2a} option selected"
useUpdateVars=false useUpdateVars=false