From a463250ecf3658fa2b1084261ef7979faf76bdba Mon Sep 17 00:00:00 2001 From: Patrick O'Brien Date: Mon, 27 Mar 2017 13:37:19 -0400 Subject: [PATCH] don't hash an empty password --- .gitignore | 2 ++ advanced/Scripts/webpage.sh | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 91014dcd..e7ebe0b6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ __pycache__ .cache .pullapprove.yml +Vagrantfile +.vagrant/ diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 55ae3d96..c6717cf1 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -81,8 +81,15 @@ SetWebPassword(){ exit 1 fi - read -s -p "Enter New Password: " PASSWORD + read -s -p "Enter New Password (Blank for no password): " PASSWORD echo "" + + if [ "${PASSWORD}" == "" ]; then + change_setting "WEBPASSWORD" "" + echo "Password Removed" + exit 0 + fi + read -s -p "Confirm Password: " CONFIRM echo "" if [ "${PASSWORD}" == "${CONFIRM}" ] ; then