1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 21:29:42 +00:00

fix: auth failed when pwd is space (#54)

This commit is contained in:
bunizao
2025-11-16 07:57:23 +08:00
committed by GitHub
parent aa85672833
commit a015cd6da8

View File

@@ -474,7 +474,7 @@ request_sudo_access() {
# Traditional password method
echo -e "${PURPLE}${ICON_ARROW}${NC} ${prompt_msg}"
echo -ne "${PURPLE}${ICON_ARROW}${NC} Password: "
read -s password
IFS= read -r -s password
echo ""
if [[ -n "$password" ]] && echo "$password" | sudo -S true 2> /dev/null; then
return 0