From f8cb96d32832baccf7ba8380d707b876b989c53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Thu, 15 Jan 2026 13:26:06 +0800 Subject: [PATCH] fix: resolve password input issue with special characters Remove -icanon mode from stty settings to fix password authentication failures when passwords contain special characters like '.' or '@'. The non-canonical mode (-icanon min 1 time 0) caused character loss in Terminal.app. Using only -echo keeps canonical mode which provides more reliable character handling across all terminal emulators. --- lib/core/sudo.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/sudo.sh b/lib/core/sudo.sh index 57b80b4..31011c6 100644 --- a/lib/core/sudo.sh +++ b/lib/core/sudo.sh @@ -66,11 +66,11 @@ _request_password() { printf "${PURPLE}${ICON_ARROW}${NC} Password: " > "$tty_path" - # Disable terminal echo to hide password input - stty -echo -icanon min 1 time 0 < "$tty_path" 2> /dev/null || true + # Disable terminal echo to hide password input (keep canonical mode for reliable input) + stty -echo < "$tty_path" 2> /dev/null || true IFS= read -r password < "$tty_path" || password="" # Restore terminal echo immediately - stty echo icanon < "$tty_path" 2> /dev/null || true + stty echo < "$tty_path" 2> /dev/null || true printf "\n" > "$tty_path"