Skip to content

fix(api): reject empty email action links#2569

Open
pjpjq wants to merge 1 commit into
supabase:masterfrom
pjpjq:codex/error-on-noop-admin-links
Open

fix(api): reject empty email action links#2569
pjpjq wants to merge 1 commit into
supabase:masterfrom
pjpjq:codex/error-on-noop-admin-links

Conversation

@pjpjq

@pjpjq pjpjq commented Jun 8, 2026

Copy link
Copy Markdown

What changed

  • Treat an empty action link from GetEmailActionLink as an internal error.
  • Prevent POST /admin/generate_link from returning a successful response with an empty action_link.
  • Add regression coverage for the empty action-link path.

Why

Self-hosted or custom no-op mailer paths should fail clearly instead of silently returning a successful response that cannot be used.

Fixes #263.

Validation

  • go test ./internal/api -run 'TestMail/TestGenerateLink|TestMail/TestGenerateLinkReturnsErrorForEmptyActionLink' -count=1
  • go test ./internal/api -run TestMail -count=1
  • git diff --check

@pjpjq pjpjq requested a review from a team as a code owner June 8, 2026 10:24
@pjpjq pjpjq changed the title fix(api): 拒绝生成空邮件 action link fix(api): reject empty email action links Jun 9, 2026
@pjpjq pjpjq force-pushed the codex/error-on-noop-admin-links branch from 90d3ed6 to 126e72b Compare June 9, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POST /admin/generate_link returns empty string when SMTP env vars aren't set

1 participant