New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Bokeh doesn't support IPv6 websocket origins #13811
Comments
@huaracheguarache is this something you have any interest in working on in Bokeh? Speaking plainly, a new contributor with their own directly motivating use-case to solve would probably result in the fastest movement on this. |
Sure, I could give it a try, but I can't promise anything given my coding skills ;) |
In order to be able to separate IPv6 addresses and port values I think it's best to adopt the same address format that browsers use, where IPv6 addresses are enclosed inside square brackets (example address and port):
I can see that the address validation in util.py is fairly simple. Should I keep it that way with IPv6 as well, or should I include some regex to check whether the provided IPv6 address is a valid address? I can also try to extend this to the IPv4 code to make a more thorough validity check of those addresses as well. |
@huaracheguarache We'd be happy to have any improvements to the IP checking in Note that permitting ipv6 addresses in |
Software versions
Python version : 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0]
IPython version : (not installed)
Tornado version : 6.4
Bokeh version : 3.4.0
BokehJS static path : /var/home/michael/micromamba/envs/test_bokeh/lib/python3.12/site-packages/bokeh/server/static
node.js version : (not installed)
npm version : (not installed)
jupyter_bokeh version : (not installed)
Operating system : Linux-6.8.1-300.fc40.x86_64-x86_64-with-glibc2.39
Browser name and version
Firefox 124.0.1
Jupyter notebook / Jupyter Lab version
No response
Expected behavior
Serving a Bokeh script with an IPv6 address in
--allow-websocket-origin
should allow you to connect over said IPv6 address.Observed behavior
Adding attempting to do this with either [::1]:5006 or ::1:5006 results in an invalid host value error.
Example code
Stack traceback or browser console output
Trying with [::1]:5006:
And with ::1:5006:
Screenshots
No response
The text was updated successfully, but these errors were encountered: