Version:
- listmonk: v6.1.0
- OS: Docker
Description of the bug and steps to reproduce:
- Ensure
Include `List-Unsubscribe` header setting is enabled.
- Create a public double opt-in list.
- Subscribe a user to the list.
- 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:
- Blocklist the user (though could have unintended behaviour as would unsubscribe from other lists)
- Mark the user as unsubscribed for all unconfirmed lists in the opt-in email
- Don't include the header in opt-in confirmation emails
- Leave as is
Version:
Description of the bug and steps to reproduce:
Include `List-Unsubscribe` headersetting is enabled.POSTrequest to theList-Unsubscribeheader in the email sent to the user (What theList-Unsubscribe-Post: List-Unsubscribe=One-Clicktells 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
POSTyou 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-Unsubscribeheader 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: