diff options
author | luxagraf <sng@luxagraf.net> | 2022-02-13 16:48:54 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2022-02-13 16:48:54 -0500 |
commit | 26a2d4a684db273ff707428e36911741a37532f2 (patch) | |
tree | 4f9c3665199516378aedd409aa896e7eb909fde4 /app/lib/django_comments/views | |
parent | 26c7400f5651d36b84adb3971c09dcc0b275b004 (diff) |
main: updated to django 4.0
Diffstat (limited to 'app/lib/django_comments/views')
-rw-r--r-- | app/lib/django_comments/views/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/django_comments/views/utils.py b/app/lib/django_comments/views/utils.py index a5f5c11..793fc43 100644 --- a/app/lib/django_comments/views/utils.py +++ b/app/lib/django_comments/views/utils.py @@ -12,7 +12,7 @@ except ImportError: # Python 2 from django.http import HttpResponseRedirect from django.shortcuts import render, resolve_url from django.core.exceptions import ObjectDoesNotExist -from django.utils.http import is_safe_url +from django.utils.http import url_has_allowed_host_and_scheme import django_comments @@ -28,7 +28,7 @@ def next_redirect(request, fallback, **get_kwargs): Returns an ``HttpResponseRedirect``. """ next = request.POST.get('next') - if not is_safe_url(url=next, allowed_hosts={request.get_host()}): + if not url_has_allowed_host_and_scheme(url=next, allowed_hosts={request.get_host()}): next = resolve_url(fallback) if get_kwargs: |