From a6f3d720304d9d08fce40c6e6867d13b252ea4a7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 29 Nov 2019 23:28:36 +0000 Subject: [PATCH] pash: prevent password from leaking through set -x --- pash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pash b/pash index 1806f5d..e506904 100755 --- a/pash +++ b/pash @@ -178,6 +178,10 @@ main() { # state on exit or Ctrl+C. trap 'stty echo icanon' INT EXIT + # Ensure that debug mode is never enabled to + # prevent the password from leaking. + set +x + case $1 in a*) pw_add "$2" ;; c*) pw_copy "$2" ;;