Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/werkzeug/serving.py", line 363, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.10/dist-packages/werkzeug/serving.py", line 324, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1498, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1480, in wsgi_app
return response(environ, start_response)
File "/usr/local/lib/python3.10/dist-packages/werkzeug/wrappers/response.py", line 576, in __call__
app_iter, status, headers = self.get_wsgi_response(environ)
File "/usr/local/lib/python3.10/dist-packages/werkzeug/wrappers/response.py", line 562, in get_wsgi_response
headers = self.get_wsgi_headers(environ)
File "/usr/local/lib/python3.10/dist-packages/werkzeug/wrappers/response.py", line 481, in get_wsgi_headers
location = iri_to_uri(location)
File "/usr/local/lib/python3.10/dist-packages/werkzeug/urls.py", line 153, in iri_to_uri
if parts.port:
File "/usr/lib/python3.10/urllib/parse.py", line 185, in port
raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as ':1'
I upgraded to Werkzeug 3.0.3 and now I'm no longer able to redirect to ipv6 urls.
Example:
The redirect produces the following error:
I believe the issue was introduced with https://github.com/pallets/werkzeug/commit/97fb2f722297ae4e12e36dab024e0acf8477b3c8 .
Environment: