Close Campaign interface audit gaps

This commit is contained in:
2026-08-04 01:04:39 +02:00
parent 3f3545f080
commit df5a93d6a3
10 changed files with 153 additions and 15 deletions
@@ -23,6 +23,9 @@ from govoplan_campaign.backend.path_security import (
assert_server_safe_campaign_paths,
)
from govoplan_campaign.backend.campaign.loader import load_campaign_json
from govoplan_campaign.backend.campaign.mail_profile_boundary import (
CampaignMailProfileBoundaryError,
)
from govoplan_campaign.backend.attachments.resolver import resolve_campaign_attachments
from govoplan_campaign.backend.persistence.versions import (
is_version_final_locked,
@@ -324,7 +327,7 @@ def preview_campaign_attachments(
include_unmatched=payload.include_unmatched,
include_unlinked_candidates=payload.include_unlinked_candidates,
)
except CampaignPathSecurityError as exc:
except (CampaignPathSecurityError, CampaignMailProfileBoundaryError) as exc:
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail=str(exc)
) from exc