concatenate all values before passing to TYPE_CMD to avoid race conditions due to buffering

This commit is contained in:
Joel Beckmeyer 2021-07-14 15:56:58 -04:00
parent 40837d70af
commit 26f8aae606
1 changed files with 4 additions and 5 deletions

View File

@ -103,11 +103,10 @@ if [[ $typeit -eq 0 ]]; then
wl-copy "$(_pass_get $field)"
else
if [[ $field == "autotype" ]] || [[ $autotype -eq 1 ]]; then
_pass_get "username" | ${TYPE_CMD}
printf "\t" | ${TYPE_CMD}
_pass_get "password" | ${TYPE_CMD}
printf "\n" | ${TYPE_CMD}
username=$(_pass_get "username")
password=$(_pass_get "password")
printf "%b\t%b\n" $username $password | $TYPE_CMD
else
_pass_get $field | ${TYPE_CMD}
_pass_get $field | $TYPE_CMD
fi
fi