When setting a blank password, use `webserver.api.password` instead of `webserver.api.pwhash` (#5465)

pull/5476/head
DL6ER 7 months ago committed by GitHub
commit 395110f92f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -145,4 +145,8 @@ getFTLConfigValue(){
#######################
setFTLConfigValue(){
pihole-FTL --config "${1}" "${2}" >/dev/null
if [[ $? -eq 5 ]]; then
echo -e " ${CROSS} ${1} set by environment variable. Please unset it to use this function"
exit 5
fi
}

@ -43,7 +43,7 @@ SetWebPassword() {
echo ""
if [ "${PASSWORD}" == "" ]; then
setFTLConfigValue "webserver.api.pwhash" "" >/dev/null
setFTLConfigValue "webserver.api.password" ""
echo -e " ${TICK} Password Removed"
exit 0
fi
@ -54,7 +54,7 @@ SetWebPassword() {
if [ "${PASSWORD}" == "${CONFIRM}" ] ; then
# pihole-FTL will automatically hash the password
setFTLConfigValue "webserver.api.password" "${PASSWORD}" >/dev/null
setFTLConfigValue "webserver.api.password" "${PASSWORD}"
echo -e " ${TICK} New password set"
else
echo -e " ${CROSS} Passwords don't match. Your password has not been changed"

Loading…
Cancel
Save