mirror of
https://github.com/tw93/Mole.git
synced 2026-02-11 11:49:22 +00:00
fix: auth failed when pwd is space (#54)
This commit is contained in:
@@ -474,7 +474,7 @@ request_sudo_access() {
|
|||||||
# Traditional password method
|
# Traditional password method
|
||||||
echo -e "${PURPLE}${ICON_ARROW}${NC} ${prompt_msg}"
|
echo -e "${PURPLE}${ICON_ARROW}${NC} ${prompt_msg}"
|
||||||
echo -ne "${PURPLE}${ICON_ARROW}${NC} Password: "
|
echo -ne "${PURPLE}${ICON_ARROW}${NC} Password: "
|
||||||
read -s password
|
IFS= read -r -s password
|
||||||
echo ""
|
echo ""
|
||||||
if [[ -n "$password" ]] && echo "$password" | sudo -S true 2> /dev/null; then
|
if [[ -n "$password" ]] && echo "$password" | sudo -S true 2> /dev/null; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user