From 6284da2ae69e8ea48baae965858f98c5c4f2d501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 2 Jun 2019 21:35:02 +0200 Subject: [PATCH] misc: catch all unicode exceptions when checking next_url (#33083) --- mellon/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mellon/views.py b/mellon/views.py index c7ad9f0..47a9f5e 100644 --- a/mellon/views.py +++ b/mellon/views.py @@ -69,7 +69,7 @@ def check_next_url(request, next_url): return try: next_url.encode('ascii') - except UnicodeDecodeError: + except UnicodeError: log.warning('next parameter ignored, as is\'s not an ASCII string') return if not utils.same_origin(next_url, request.build_absolute_uri()):