Remove trailing spaces
This commit is contained in:
parent
87511b25ce
commit
4f7785459a
@ -127,13 +127,14 @@ if [ ${#CURR_PASSWORD} -eq 0 ]; then
|
|||||||
exit 4
|
exit 4
|
||||||
else
|
else
|
||||||
pass=$(gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USERNAME/$CURR_APP)
|
pass=$(gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USERNAME/$CURR_APP)
|
||||||
echo ${pass}
|
echo "${pass}" | xargs
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# store password
|
# store password
|
||||||
if [ ! -d ~/.passwords/$CURR_USERNAME ]; then
|
if [ ! -d ~/.passwords/$CURR_USERNAME ]; then
|
||||||
mkdir -p ~/.passwords/$CURR_USERNAME
|
mkdir -p ~/.passwords/$CURR_USERNAME
|
||||||
fi
|
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
|
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
|
if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then
|
||||||
exit 5
|
exit 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user