Skip to content

Fixs #2987 - Prevent confirmed subscriber becoming unconfirmed when re-subscribing.#2996

Open
blu3id wants to merge 1 commit intoknadh:masterfrom
blu3id:fix-issue-2987
Open

Fixs #2987 - Prevent confirmed subscriber becoming unconfirmed when re-subscribing.#2996
blu3id wants to merge 1 commit intoknadh:masterfrom
blu3id:fix-issue-2987

Conversation

@blu3id
Copy link
Copy Markdown

@blu3id blu3id commented Apr 10, 2026

This closes #2987 or at least fixes the fix of the regression identified in #2976

A confirmed double opt-in subscriber is no-longer unsubscribed if they re-subscribe to the list (while still subscribed and confirmed).

This doesn't address the discussion point of not leaking information about subscriber status as a confirmed subscriber on a double opt-in list will now get the message "Subscribed successfully." rather than "An e-mail has been sent to you to confirm your subscription(s)." to avoid leaking information about subscription status".

However this was how things have always been and would be a larger piece of work/ restructuring. A work around is adjusting the messages in the i18n language file to remove the difference between the messages.

@knadh knadh added the hodor-review Automated AI code review label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues Found

Minor (P3)

  • [P3] Update comment to match confirmed-status override behavior (queries/subscribers.sql:191-194)
    • The comment says $11 (allow resubscribe) overrides existing statuses, but the newly moved confirmed branch now takes precedence even when $11 = TRUE, meaning confirmed subscriptions are not overridden; this mismatch can mislead future changes around subscription state transitions.

Summary

Total issues: 0 critical, 0 important, 1 minor.

Overall Verdict

Status: Patch is correct

Explanation: The reordered CASE branch correctly preserves an existing confirmed subscription when a user re-subscribes via the public form with allow resubscribe enabled, preventing an unintended downgrade to unconfirmed. No functional regressions are evident in the diff, aside from a now-misleading comment.


Review generated by Hodor (model: gpt-5.2)

Review Metrics — 8 turns, 7 tool calls, 57s

  • Tokens: in 6.5K | cached 37.4K | out 2.6K (total 46.5K)
  • Cost: $0.0542

@knadh knadh removed the hodor-review Automated AI code review label Apr 13, 2026
@blu3id
Copy link
Copy Markdown
Author

blu3id commented Apr 13, 2026

Comment adjusted per review.

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.

Subscribing to double opt-in list after confirming subscription changes status to unconfirmed

2 participants