security: harden Campaign delivery effects and reconciliation
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import Any
|
||||
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
|
||||
from .mail_profile_boundary import assert_campaign_uses_mail_profile_reference
|
||||
from .models import CampaignConfig
|
||||
|
||||
|
||||
@@ -83,6 +84,7 @@ def load_campaign_config(
|
||||
schema_path: str | Path | None = None,
|
||||
) -> CampaignConfig:
|
||||
data = load_campaign_json(path)
|
||||
assert_campaign_uses_mail_profile_reference(data)
|
||||
if validate_schema:
|
||||
validate_against_schema(data, schema_path=schema_path)
|
||||
return CampaignConfig.model_validate(data)
|
||||
|
||||
Reference in New Issue
Block a user