m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSvend Sorensen <svend@ciffer.net>2015-01-08 13:36:45 -0800
committerSvend Sorensen <svend@ciffer.net>2015-01-08 13:36:45 -0800
commitc9dc5538a8158b10a226eeb44d865e57d3d81c88 (patch)
tree27206f1a8bf277eb8e4952eed0084d33ccbfdc33 /contrib
parentec27ece8fcc0bde0571cafe2ed28b15614536d27 (diff)
emacs: Quote shell arguments
Quote shell arguments for insert so that it handles passwords and entry names that contain special characters.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/emacs/password-store.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index cdecad4..746f133 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -200,7 +200,10 @@ Separate multiple IDs with spaces."
"Insert a new ENTRY containing PASSWORD."
(interactive (list (read-string "Password entry: ")
(read-passwd "Password: " t)))
- (message (shell-command-to-string (format "echo %s | %s insert -m -f %s" password password-store-executable entry))))
+ (message (shell-command-to-string (format "echo %s | %s insert -m -f %s"
+ (shell-quote-argument password)
+ password-store-executable
+ (shell-quote-argument entry)))))
;;;###autoload
(defun password-store-generate (entry &optional password-length)