git » chasquid » commit a1ca50a

hooks: Add mising quote in the example post-data hook

author Alberto Bertogli
2020-02-02 02:07:38 UTC
committer Alberto Bertogli
2020-02-02 02:07:38 UTC
parent 0df2e325ed433fe7e1bcaff203318b39732d13dd

hooks: Add mising quote in the example post-data hook

The example post-data hook was missing a quote around a sub-shell
execution.

This is harmless because the content itself is admin-provided and not
related to user input, but this commit fixes the quote for defense in
depth and consistency.

etc/chasquid/hooks/post-data +1 -1

diff --git a/etc/chasquid/hooks/post-data b/etc/chasquid/hooks/post-data
index aa0ccc9..ae24315 100755
--- a/etc/chasquid/hooks/post-data
+++ b/etc/chasquid/hooks/post-data
@@ -86,7 +86,7 @@ if [ "$AUTH_AS" != "" ] && command -v dkimsign; then
 			&& [ -f "certs/$DOMAIN/dkim_privkey.pem" ]; then
 		dkimsign -n -hd \
 			-key "certs/$DOMAIN/dkim_privkey.pem" \
-			-s $(cat "domains/$DOMAIN/dkim_selector") \
+			-s "$(cat "domains/$DOMAIN/dkim_selector")" \
 			-d "$DOMAIN" \
 			< "$TF"
 	fi