Skip to content

Commit

Permalink
Merge pull request #2752 from modoboa/fix/delete_domain_post
Browse files Browse the repository at this point in the history
Enforce POST methods for delete domain view.
  • Loading branch information
tonioo committed Jan 19, 2023
2 parents 30e9549 + a6096f5 commit 8e14ac9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modoboa/admin/views/domain.py
Expand Up @@ -16,6 +16,7 @@
from django.utils.translation import ugettext as _, ungettext
from django.views import generic
from django.views.decorators.csrf import ensure_csrf_cookie
from django.views.decorators.http import require_http_methods

from modoboa.core import signals as core_signals
from modoboa.lib.exceptions import PermDeniedException
Expand Down Expand Up @@ -230,6 +231,7 @@ def editdomain(request, dom_id):

@login_required
@permission_required("admin.delete_domain")
@require_http_methods(["POST"])
def deldomain(request, dom_id):
keepdir = request.POST.get("keepdir", "false") == "true"
try:
Expand Down

0 comments on commit 8e14ac9

Please sign in to comment.