Browse Source

Fix List-Unsubscribe email header value: add angle brackets

pull/313/head
Pēteris Caune 5 years ago
parent
commit
f9c61dad23
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
3 changed files with 4 additions and 3 deletions
  1. +2
    -1
      CHANGELOG.md
  2. +1
    -1
      hc/accounts/models.py
  3. +1
    -1
      hc/api/transports.py

+ 2
- 1
CHANGELOG.md 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) - Added JSON endpoint for Shields.io (#304)
### Bug Fixes ### 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 ## v1.11.0 - 2019-11-22


+ 1
- 1
hc/accounts/models.py View File

@ -174,7 +174,7 @@ class Profile(models.Model):
unsub_url = self.reports_unsub_url() 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 = { ctx = {
"checks": checks, "checks": checks,


+ 1
- 1
hc/api/transports.py View File

@ -61,7 +61,7 @@ class Email(Transport):
unsub_link = self.channel.get_unsub_link() 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: try:
# Look up the sorting preference for this email address # Look up the sorting preference for this email address


Loading…
Cancel
Save