Browse Source

Unsubscribe is CSRF exempt.

pull/313/head
Pēteris Caune 5 years ago
parent
commit
4ee92a44ff
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 1 additions and 1 deletions
  1. +1
    -0
      hc/front/views.py
  2. +0
    -1
      templates/accounts/unsubscribe_submit.html

+ 1
- 0
hc/front/views.py View File

@ -701,6 +701,7 @@ def verify_email(request, code, token):
return render(request, "bad_link.html")
@csrf_exempt
def unsubscribe_email(request, code, token):
channel = get_object_or_404(Channel, code=code)
if channel.make_token() != token:


+ 0
- 1
templates/accounts/unsubscribe_submit.html View File

@ -6,7 +6,6 @@
<p>Please press the button below to unsubscribe:</p>
<br />
<form id="form" method="post">
{% csrf_token %}
<input
id="submit-btn"
type="submit"


Loading…
Cancel
Save