mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Double hash the password directly in the install script
This commit is contained in:
parent
c8e1e6dc8a
commit
a5733508ae
1 changed files with 3 additions and 1 deletions
|
@ -1413,7 +1413,9 @@ main() {
|
|||
pw=""
|
||||
if [[ $(grep 'WEBPASSWORD' -c /etc/pihole/setupVars.conf) == 0 ]] ; then
|
||||
pw=$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 8)
|
||||
/usr/local/bin/pihole -a -p "${pw}"
|
||||
hash=$(echo -n ${pw} | sha256sum | sed 's/\s.*$//')
|
||||
hash=$(echo -n ${hash} | sha256sum | sed 's/\s.*$//')
|
||||
echo "WEBPASSWORD=${hash}" >> ${setupVars}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue