From cf46544294d9ee1d65c68c2aae33fb429320ad91 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 29 May 2016 18:45:04 +0200 Subject: [PATCH] csrf exempt decorator on coinify callback view --- shop/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shop/views.py b/shop/views.py index b61c0105..1b8e485b 100644 --- a/shop/views.py +++ b/shop/views.py @@ -14,6 +14,8 @@ from django.views.generic import ( ) from django.views.generic.base import RedirectView from django.views.generic.detail import SingleObjectMixin +from django.utils.decorators import method_decorator +from django.views.decorators.csrf import csrf_exempt from camps.models import Camp from shop.models import ( @@ -379,6 +381,7 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn class CoinifyCallbackView(SingleObjectMixin, View): + @method_decorator(csrf_exempt) def post(self, request, *args, **kwargs): # Get the signature from the HTTP headers signature = request.META['HTTP_X_COINIFY_CALLBACK_SIGNATURE']