webssh/tests
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
..
data Added fonts directory 2020-01-23 17:25:51 +08:00
__init__.py Use absolute path for importing modules 2018-04-26 22:38:16 +08:00
sshserver.py Drop support for Python version below 3.8 2023-02-27 22:13:24 +08:00
test_app.py Use options.delay instead of DELAY 2020-10-07 20:29:13 +08:00
test_handler.py handle invalid characeters in encoding 2023-03-30 10:52:53 -04:00
test_main.py Refactored method is_forbidden 2019-01-16 22:58:49 +08:00
test_policy.py Updated test_policy.py 2018-11-15 19:49:45 +08:00
test_settings.py Added test for check_encoding_setting 2020-02-13 10:15:29 +08:00
test_utils.py Support link scope ipv6 address 2019-09-19 10:55:34 +08:00
utils.py Updated tests/utils.py 2018-09-18 20:56:34 +08:00