webssh/webssh
Kyle Larose dfea8a1624
handle invalid characeters in encoding
When establishing a connection to an SSH server, WebSSH tries to guess
at its encoding using a command sent prior to opening the terminal.
Unfortunately, sometimes this can return data which does not form proper
input for the `encode` function used by `is_valid_encoding` to test
whether the encoding is known.

In particular, we ran in to a case where the server was returning a
string which had a \0 in it when converted to ascii. That raised a
`ValueError` (as opposed to `LookupError`), which was uncaught.

Handle the `ValueError` case as well, treating it as an unknown encoding
so that we fall back on the default.
2023-03-30 10:52:53 -04:00
..
static 65535/tcp is a valid port number 2022-03-09 18:25:09 +01:00
templates Updated index.html template 2020-01-23 19:20:43 +08:00
__init__.py Bump version to 1.5.3 2020-10-02 13:55:56 +08:00
_version.py Bump version to 1.6.1 2022-11-21 17:12:05 +08:00
handler.py Close websocket if there is no corresponding ssh connection 2022-11-21 14:52:38 +08:00
main.py Added an option for specifying the default character encoding of your ssh servers 2020-02-13 09:40:42 +08:00
policy.py Fixed AutoAddPolicy 2018-04-23 18:14:42 +08:00
settings.py Fixed a bug of getting custom font url 2022-10-30 14:37:11 +08:00
utils.py handle invalid characeters in encoding 2023-03-30 10:52:53 -04:00
worker.py Use uuid4 to generate id for Python3.5 Python3.4 Python2.7 2022-11-21 14:32:41 +08:00