Skip to content
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

HTTPS certificate is force-checked even on HTTP addresses (without error message) #337

Open
szotsaki opened this issue May 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@szotsaki
Copy link

Describe the bug

To Reproduce

  1. Have a local address with an invalid HTTPS certificate (to be easier to reproduce the bug)
  2. Fill out the connection parameter starting with HTTP scheme: http://192.168.1.1
  3. Leave the "Verify HTTPS certificate" turned on, since it shouldn't apply for you
  4. Jellycon fails to connect

Expected behavior

  • Jellycon successfully connects to an HTTP page (which also serves HTTPS, but with a broken certificate)
  • Jellycon shows an error message what is going on without the need for an ADB shell

Logs

Error Type: <class 'requests.exceptions.SSLError'>
Error Contents: HTTPSConnectionPool(host='192.168.1.1', port=443): Max retries exceeded with url: /QuickConnect/Initiate (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.1.1'. (_ssl.c:1006)")))
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 467, in _make_request 
  self._validate_conn(conn)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 1096, in _validate_conn
  conn.connect()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 642, in connect
  sock_and_verified = _ssl_wrap_socket_and_match_hostname(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 782, in _ssl_wrap_socket_and_match_hostname
  ssl_sock = ssl_wrap_socket(
             ^^^^^^^^^^^^^^^^
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/util/ssl_.py", line 470, in ssl_wrap_socket
  ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.urllib3/lib/urllib3/util/ssl_.py", line 514, in _ssl_wrap_socket_impl
  return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.11/lib/python3.11/ssl.py", line 517, in wrap_socket
  return self.sslsocket_class._create(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.11/lib/python3.11/ssl.py", line 1108, in _create
  self.do_handshake()
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.11/lib/python3.11/ssl.py", line 1383, in do_handshake
  **self._sslobj.do_handshake()

System (please complete the following information):

  • OS: Shield
  • Jellyfin Version: 10.9.2
  • Kodi Version: 21.0
  • Addon Version: 0.8.0
@szotsaki szotsaki added the bug Something isn't working label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant