Skip to content

List-Unsubscribe header broken on double opt-in confirmation emails #3063

@blu3id

Description

@blu3id

Version:

  • listmonk: v6.1.0
  • OS: Docker

Description of the bug and steps to reproduce:

  1. Ensure Include `List-Unsubscribe` header setting is enabled.
  2. Create a public double opt-in list.
  3. Subscribe a user to the list.
  4. Issue a POST request to the List-Unsubscribe header in the email sent to the user (What the List-Unsubscribe-Post: List-Unsubscribe=One-Click tells mail clients to do).

Expected result: User is marked as unsubscribed for the unconfirmed list(s) or blocklisted?
What actually happens: Nothing - if you examine the response to the POST you see a "Unsubscribed successfully" message.

Discussion:

I came across this accidentally exploring the code and looking closely at headers etc. to investigate #3037. The issue is the unsubscribe URL is populated as follows using the "dummy" UUID: /subscription/00000000-0000-0000-0000-000000000000/{subscriber-uuid} this means that the POST handler is unable to identify the list to unsubscribe the user from.

While this "bug" doesn't pose a big issue it technically is abusing the List-Unsubscribe header standard as the "one click" doesn't do anything. Though the argument can be made that the user hasn't confirmed their subscription so there is nothing to unsubscribe from.

I don't know what the best approach to fixing this would be options I can think of:

  1. Blocklist the user (though could have unintended behaviour as would unsubscribe from other lists)
  2. Mark the user as unsubscribed for all unconfirmed lists in the opt-in email
  3. Don't include the header in opt-in confirmation emails
  4. Leave as is

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions