From 355cb35feee33a7b98f673a43f3e3bacdf82b44a Mon Sep 17 00:00:00 2001 From: Abhishek Koneru Date: Thu, 7 Mar 2013 11:05:31 -0500 Subject: Patch to escape interpolations for parameters having '%' in their values. Ticket #493 - Changes done to bypass interpolation for using a % as part of a value. All occurences of % will be replaced by a %% in interactive pkispawn/pkidestroy. If a file is passed, then the values with a '%' need to have an escape character % --- base/deploy/src/scriptlets/pkiparser.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'base/deploy/src/scriptlets') diff --git a/base/deploy/src/scriptlets/pkiparser.py b/base/deploy/src/scriptlets/pkiparser.py index aec125016..0ed366579 100644 --- a/base/deploy/src/scriptlets/pkiparser.py +++ b/base/deploy/src/scriptlets/pkiparser.py @@ -277,6 +277,7 @@ class PKIConfigParser: done = True break + value = value.replace("%", "%%") if section: self.set_property(section, property, value) @@ -301,6 +302,7 @@ class PKIConfigParser: else: print ' ' * self.indent + 'Passwords do not match.' + password = password.replace("%", "%%") if section: self.set_property(section, property, password) -- cgit