Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
unsubscribe: Configure as csrf_exempt.
Tim Abbotta965c77af685
diff --git a/zerver/views/unsubscribe.py b/zerver/views/unsubscribe.pyindex 6814d57bd4c..6154f6107b2 100644--- a/zerver/views/unsubscribe.py+++ b/zerver/views/unsubscribe.py@@ -2,6 +2,7 @@ from typing import Callablefrom django.http import HttpRequest, HttpResponsefrom django.shortcuts import render+from django.views.decorators.csrf import csrf_exemptfrom confirmation.models import Confirmation, ConfirmationKeyException, get_object_from_keyfrom zerver.context_processors import common_context@@ -72,6 +73,7 @@ email_unsubscribers = {}# Login NOT required. These are for one-click unsubscribes.+@csrf_exemptdef email_unsubscribe(request: HttpRequest, email_type: str, confirmation_key: str) -> HttpResponse:if email_type in email_unsubscribers:display_name, unsubscribe_function = email_unsubscribers[email_type]