From 951a91723de1f19a93d37e6c1d4d3e2b28f9ae20 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 13 Oct 2013 13:48:19 +0200 Subject: [PATCH] make sure that options are quoted, as people can add a shell script there with a comma that would produce invalid configuration upon being wrote again --- library/system/authorized_key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/system/authorized_key b/library/system/authorized_key index 322d2c4348..a60d17c9a0 100644 --- a/library/system/authorized_key +++ b/library/system/authorized_key @@ -256,7 +256,7 @@ def writekeys(module, filename, keys): option_strings = [] for option_key in sorted(options.keys()): if options[option_key]: - option_strings.append("%s=%s" % (option_key, options[option_key])) + option_strings.append("%s=\"%s\"" % (option_key, options[option_key])) else: option_strings.append("%s " % option_key)