QuackatronHQ / Gigarepo

Use of both safe and unsafe HTTP methods for a view PY-S6007
Security
Major
a month ago2 years old
Allowing both safe and unsafe methods for a view is unsecure
 3from django.views.decorators.http import require_http_methods
 4
 5
 6@require_http_methods(["GET", "POST"])  # Sensitive 7def current_datetime(request):
 8    now = datetime.datetime.now()
 9    html = "<html><body>It is %s.</body></html>" % now