Fix List-Unsubscribe email header value: add angle brackets

This commit is contained in:
Pēteris Caune 2019-12-09 14:04:14 +02:00
parent 1cdb6e6d1d
commit f9c61dad23
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
3 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,8 @@ All notable changes to this project will be documented in this file.
- Added JSON endpoint for Shields.io (#304)
### Bug Fixes
- Don't set CSRF cookie on first visit. Signup is exempt from CSRF protection.
- Don't set CSRF cookie on first visit. Signup is exempt from CSRF protection
- Fix List-Unsubscribe email header value: add angle brackets
## v1.11.0 - 2019-11-22

View File

@ -174,7 +174,7 @@ class Profile(models.Model):
unsub_url = self.reports_unsub_url()
headers = {"List-Unsubscribe": unsub_url, "X-Bounce-Url": unsub_url}
headers = {"List-Unsubscribe": "<%s>" % unsub_url, "X-Bounce-Url": unsub_url}
ctx = {
"checks": checks,

View File

@ -61,7 +61,7 @@ class Email(Transport):
unsub_link = self.channel.get_unsub_link()
headers = {"X-Bounce-Url": bounce_url, "List-Unsubscribe": unsub_link}
headers = {"X-Bounce-Url": bounce_url, "List-Unsubscribe": "<%s>" % unsub_link}
try:
# Look up the sorting preference for this email address