summaryrefslogtreecommitdiff
path: root/app/lib/django_comments/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/django_comments/views')
-rw-r--r--app/lib/django_comments/views/utils.py4
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: