oh that’s strange. I’ll try to duplicate that in a fresh install. None of the recent updates touch the ./console/index.php, so I will see where this may be happening.
I think this may be sed counting characters and adding in, rather than changing… but it may only be happening if a password is as you described ‘Password1234’
Just for reference, here is what the function looks like that adjusts those lines:
function _quickconsole() {
CONSOLEIP=$(curl -s http://ipecho.net/plain || curl -s http://ifconfig.me/ip ; echo)
sed -i -e "s/console-username/${username}/g" \
-e "s/console-password/${password}/g" \
-e "s/ipaccess/$CONSOLEIP/g" /home/${username}/.console/index.php
}
Just tried it …
by changing ‘console-password’ within the file with the given command using ‘Password1234’ and it put in the proper password. So it may had been from how it reads the password in the script.
Via this function:
echo -n "Password: (hit enter to generate a password) "; read password
if [[ ! -z "${password}" ]]; then
echo "setting password to ${password}"
passwd=${password}
echo "${username}:${passwd}" | chpasswd >>"${OUTTO}" 2>&1
(echo -n "${username}:${REALM}:" && echo -n "${username}:${REALM}:${passwd}" | md5sum | awk '{print $1}' ) >> "${HTPASSWD}"
else
echo "setting password to ${genpass}"
passwd=${genpass}
echo "${username}:${passwd}" | chpasswd >>"${OUTTO}" 2>&1
(echo -n "${username}:${REALM}:" && echo -n "${username}:${REALM}:${passwd}" | md5sum | awk '{print $1}' ) >> "${HTPASSWD}"
fi
Although, even this should be the same as a plain text password, plain text only in the context of adding to /etc/htpasswd
during initial script run as it is hashed once added to the htpasswd file.
I’ll keep trying to duplicate this.