[extensions-web/wip/update-info-csrf] update-info: do not require CSRF token
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/wip/update-info-csrf] update-info: do not require CSRF token
- Date: Mon, 29 Mar 2021 17:56:49 +0000 (UTC)
commit e3ab0c07dce4d58b33b30700ec1ea7aa2e3b4230
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Mon Mar 29 21:54:27 2021 +0400
update-info: do not require CSRF token
sweettooth/extensions/views.py | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 6d8442af..510c7e81 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -20,6 +20,7 @@ from django.db import transaction
from django.http import JsonResponse, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden,
HttpResponseServerError, Http404
from django.shortcuts import get_object_or_404, redirect, render
from django.template.loader import render_to_string
+from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from django.urls import reverse
@@ -119,6 +120,7 @@ def shell_download(request, uuid):
return redirect(version.source.url)
@ajax_view
+@csrf_exempt
def shell_update(request):
try:
if request.method == 'POST':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]