misc: catch all unicode exceptions when checking next_url (#33083)
This commit is contained in:
parent
40674e4d1a
commit
6284da2ae6
|
@ -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()):
|
||||
|
|
Loading…
Reference in New Issue