don't hash an empty password

This commit is contained in:
Patrick O'Brien 2017-03-27 13:37:19 -04:00
parent 94f15f1b3c
commit a463250ecf
2 changed files with 10 additions and 1 deletions

2
.gitignore vendored
View file

@ -4,3 +4,5 @@
__pycache__ __pycache__
.cache .cache
.pullapprove.yml .pullapprove.yml
Vagrantfile
.vagrant/

View file

@ -81,8 +81,15 @@ SetWebPassword(){
exit 1 exit 1
fi fi
read -s -p "Enter New Password: " PASSWORD read -s -p "Enter New Password (Blank for no password): " PASSWORD
echo "" echo ""
if [ "${PASSWORD}" == "" ]; then
change_setting "WEBPASSWORD" ""
echo "Password Removed"
exit 0
fi
read -s -p "Confirm Password: " CONFIRM read -s -p "Confirm Password: " CONFIRM
echo "" echo ""
if [ "${PASSWORD}" == "${CONFIRM}" ] ; then if [ "${PASSWORD}" == "${CONFIRM}" ] ; then