From 6d2a0bc6de87d701a806912f4ca81840f0abe2a7 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 5 Oct 2018 18:00:01 -0400 Subject: [PATCH] bin/untangle-https-backup: disable configuration file interpolation. It was bound to happen: somebody changed their password to something with a percent sign in it, and it broke the secret ConfigParser interpolation that I didn't know existed. Nobody is interpolating usernames or version numbers into their password fields (if you are; see you in hell), so passing interpolation=None to our ConfigParser instantiation should fix the issue. --- bin/untangle-https-backup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/untangle-https-backup b/bin/untangle-https-backup index 25fbf9d..3abb05f 100755 --- a/bin/untangle-https-backup +++ b/bin/untangle-https-backup @@ -31,8 +31,10 @@ args = parser.parse_args() # Default to success, change it if anything fails. status = EXIT_OK -# Parse the configuration file... -config = configparser.ConfigParser() +# Parse the configuration file. In this contect "interpolation" is +# something completely berserk, and it breaks passwords containing '%' +# characters. So, we turn it off. +config = configparser.ConfigParser(interpolation=None) config.read(args.config_file) # And loop through each section. -- 2.44.2