Skip to content

Page templates can be sent as email #119

Open

Description

@JuansesDev

What happens

No send path validates the template type. A template of type page can be broadcast, scheduled through a campaign, or sent through the transactional endpoint. Only the dashboard picker filters by type.

Where

  • backend/internal/service/email.go:196,261,550 — templates fetched by id only.
  • backend/internal/service/campaign.go:53.
  • The only page checks are on the unsubscribe rendering paths (email.go:998, service/project.go:181).

Impact

A unsubscribe-page template can be mailed to the whole list.

Proposed fix

Require type = 'email' when creating a send or a campaign.

Acceptance

  • Sending with a page template returns 400.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions