Bump version to 9.5.2 and fix interpolation issues in config parser

This commit is contained in:
Sean Whalen
2026-03-25 20:21:08 -04:00
parent 12c4676b79
commit e1bdbeb257
4 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 9.5.2
### Fixed
- Fixed `ValueError: invalid interpolation syntax` when config values (from env vars or INI files) contain `%` characters, such as in passwords. Disabled ConfigParser's `%`-based string interpolation.
## 9.5.1
### Changes

View File

@@ -1955,9 +1955,7 @@ def get_dmarc_reports_from_mailbox(
)
current_time = datetime.now(timezone.utc).strftime("%d-%b-%Y")
elif isinstance(connection, MSGraphConnection):
since = (
datetime.now(timezone.utc) - timedelta(minutes=_since)
).isoformat()
since = (datetime.now(timezone.utc) - timedelta(minutes=_since)).isoformat()
current_time = datetime.now(timezone.utc).isoformat() + "Z"
elif isinstance(connection, GmailConnection):
since = (datetime.now(timezone.utc) - timedelta(minutes=_since)).strftime(

View File

@@ -264,7 +264,7 @@ def _load_config(config_file: str | None = None) -> ConfigParser:
Raises:
ConfigurationError: If *config_file* is given but does not exist.
"""
config = ConfigParser()
config = ConfigParser(interpolation=None)
if config_file is not None:
abs_path = os.path.abspath(config_file)
if not os.path.exists(abs_path):

View File

@@ -1,3 +1,3 @@
__version__ = "9.5.1"
__version__ = "9.5.2"
USER_AGENT = f"parsedmarc/{__version__}"