From 443159f77e87a70bc85ab85f5ad58b9169def88a Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Fri, 4 Oct 2013 12:41:43 -0700 Subject: Ticket 755 - Detect unescaped percent characters in deployment files The deployment config files used by pkispawn support interpolation as supplied by ConfigParser. Interpolation uses the '%' character, which means values that need to contain a '%' character need to be properly escaped. This patch detects errors with unescaped '%' characters and reports a useful message bac kto the user who is running pkispawn. This patch also adds notes to the pkispawn and pki_default.cfg man pages to explain that escaping of '%' characters is required. --- base/server/python/pki/server/deployment/pkimessages.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base/server/python/pki/server/deployment/pkimessages.py') diff --git a/base/server/python/pki/server/deployment/pkimessages.py b/base/server/python/pki/server/deployment/pkimessages.py index 339ee149e..5e996667d 100644 --- a/base/server/python/pki/server/deployment/pkimessages.py +++ b/base/server/python/pki/server/deployment/pkimessages.py @@ -179,6 +179,12 @@ PKIHELPER_CREATE_SECURITY_DATABASES_1 = "executing '%s'" PKIHELPER_DANGLING_SYMLINK_2 = "Dangling symlink '%s'-->'%s'" PKIHELPER_DICTIONARY_MASTER_MISSING_KEY_1 = "KeyError: Master dictionary "\ "is missing the key called '%s'!" +PKIHELPER_DICTIONARY_INTERPOLATION_1 = "Deployment file could not be parsed "\ + "correctly. This might be because of "\ + "unescaped '%%' characters. You must "\ + "escape '%%' characters in deployment "\ + "files (example - 'setting=foo%%%%bar')." +PKIHELPER_DICTIONARY_INTERPOLATION_2 = "Interpolation error (%s)" PKIHELPER_DIRECTORY_IS_EMPTY_1 = "directory '%s' is empty" PKIHELPER_DIRECTORY_IS_NOT_EMPTY_1 = "directory '%s' is NOT empty" PKIHELPER_GID_2 = "GID of '%s' is %s" -- cgit