Remove trailing spaces

This commit is contained in:
Bob Mottram 2016-11-19 14:15:34 +00:00
parent 87511b25ce
commit 4f7785459a
1 changed files with 2 additions and 1 deletions

View File

@ -127,13 +127,14 @@ if [ ${#CURR_PASSWORD} -eq 0 ]; then
exit 4
else
pass=$(gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USERNAME/$CURR_APP)
echo ${pass}
echo "${pass}" | xargs
fi
else
# store password
if [ ! -d ~/.passwords/$CURR_USERNAME ]; then
mkdir -p ~/.passwords/$CURR_USERNAME
fi
# padding helps to ensure than nothing can be learned from the length of the cyphertext
pad_string "${CURR_PASSWORD}" | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USERNAME/$CURR_APP
if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then
exit 5