소스 검색

Remove trailing spaces

Bob Mottram 8 년 전
부모
커밋
4f7785459a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/freedombone-pass

+ 2
- 1
src/freedombone-pass 파일 보기

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