Fix comma separated list processing in dkimpy_milter/config.py

(LP: #1901445)
This commit is contained in:
Scott Kitterman
2023-02-26 19:59:03 -05:00
parent 6d1c796a5e
commit 16ab67db0f
2 changed files with 10 additions and 2 deletions
+2
View File
@@ -15,6 +15,8 @@
#969215) #969215)
- Fix subdomain signing with top-level organizational domain (LP: #1999434) - Fix subdomain signing with top-level organizational domain (LP: #1999434)
- Thanks to Matthias Hunstock for the report and the fix - Thanks to Matthias Hunstock for the report and the fix
- Fix comma separated list processing in dkimpy_milter/config.py
(LP: #1901445)
1.2.2 2020-08-09 1.2.2 2020-08-09
- Improve README.md formating for markdown display on pypi - Improve README.md formating for markdown display on pypi
+8 -2
View File
@@ -322,9 +322,15 @@ def _dataset_to_list(dataset):
return dsd return dsd
# If it's a str and csl, it has one value and we return a list # If it's a str and csl, it has one value and we return a list
if dataset[:4] == 'csl:': if dataset[:4] == 'csl:':
return [dataset[4:].strip().strip(',')] datalist = dataset[4:].split(',')
for item in datalist:
datalist[datalist.index(item)] = item.strip().strip(',')
return datalist
else: else:
return [dataset.strip().strip(',')] datalist = dataset.split(',')
for item in datalist:
datalist[datalist.index(item)] = item.strip().strip(',')
return datalist
if dataset[-3:] == '.db' or dataset[:3] == 'db:': if dataset[-3:] == '.db' or dataset[:3] == 'db:':
# This is a Sleepycat (Oracle) DB dataset, which we dont support # This is a Sleepycat (Oracle) DB dataset, which we dont support
raise dkim.ParameterError('Unsupported dataset db datase: {0}' raise dkim.ParameterError('Unsupported dataset db datase: {0}'