summaryrefslogtreecommitdiff
path: root/src/share/ma/remove_certifier
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2013-02-09 19:54:08 +0100
committerJonas Smedegaard <dr@jones.dk>2013-03-09 05:46:00 +0100
commit45ad89b6cddbcb3c112f1c2cdfd4361bc7fdced3 (patch)
tree06d7e81a91f8a4cbb5e49dd9bb7f49ada9e9c6c1 /src/share/ma/remove_certifier
parente02c127f8e2c5001cf90429a2ee3532d7a4e3c76 (diff)
Dual-quote arguments passed to su_monkeysphere_user() when possible.dualquote
It is a healthy coding practice to keep each argument separate when executing system calls, i.e. quote each variable separately instead of relying on whitespace to indicate argument separation. Quoting shell-inside-shell is tricky to do right, and gets trickier when the wrapper demands unusually complex quoting. su_monkeysphere_user() expands arguments using "$*" which (unlike "$@") collapses all arguments into a single string, and therefore require "risky" arguments (e.g. ones containing variables that may contain space or other unusual characters) to be dual-quoted for them to not wreak havoc at the inside shell. This patch improves arguments passed to su_monkeysphere_user() by first single-quoting and then double-quoting arguments containing variables. NB! Dynamic arguments are only double-quoted ( "$@" ) which looks safe but effectively is a noop (quoting is lost at wrapper!).
Diffstat (limited to 'src/share/ma/remove_certifier')
-rw-r--r--src/share/ma/remove_certifier2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/share/ma/remove_certifier b/src/share/ma/remove_certifier
index 9f5be25..6ec9a2d 100644
--- a/src/share/ma/remove_certifier
+++ b/src/share/ma/remove_certifier
@@ -37,7 +37,7 @@ else
fi
# delete the requested key from the sphere keyring
-if gpg_sphere --delete-key --batch --yes "0x${keyID}!" ; then
+if gpg_sphere --delete-key --batch --yes "'0x${keyID}!'" ; then
# delete key from core keyring as well
gpg_core --delete-key --batch --yes "0x${keyID}!"