Blame SOURCES/0025-Limit-config-file-delimiters-to-catch-empty-values.patch

aec0ad
From 6acb134da07140618a03651756f490074ced3cbc Mon Sep 17 00:00:00 2001
aec0ad
From: Rob Crittenden <rcritten@redhat.com>
aec0ad
Date: Thu Apr 28 08:46:02 2022 -0400
aec0ad
Subject: Limit config file delimiters to =, catch empty values
aec0ad
aec0ad
ConfigParser allows both = and : as a delimiter. Limit to
aec0ad
just = to match the configuration file man page.
aec0ad
aec0ad
Don't allow empty values in options in the config file.
aec0ad
aec0ad
https://bugzilla.redhat.com/show_bug.cgi?id=2079739
aec0ad
aec0ad
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
aec0ad
---
aec0ad
 src/ipahealthcheck/core/config.py | 2 +-
aec0ad
 1 file changed, 1 insertion(+), 1 deletion(-)
aec0ad
aec0ad
diff --git a/src/ipahealthcheck/core/config.py b/src/ipahealthcheck/core/config.py
aec0ad
index 3cd4e8e..e795a2d 100644
aec0ad
--- a/src/ipahealthcheck/core/config.py
aec0ad
+++ b/src/ipahealthcheck/core/config.py
aec0ad
@@ -107,7 +107,7 @@ def read_config(config_file):
aec0ad
                         format(config_file))
aec0ad
         return config
aec0ad
 
aec0ad
-    parser = ConfigParser()
aec0ad
+    parser = ConfigParser(delimiters='=')
aec0ad
     try:
aec0ad
         parser.read(config_file)
aec0ad
     except ParsingError as e:
aec0ad
-- 
aec0ad
2.31.1
aec0ad