From 04b1fcea489573f7f5f56a3d245d5c040b0a303c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Tue, 19 Oct 2021 23:00:23 +0200 Subject: [PATCH] Verify ssl by default --- jellyfin_kodi/helper/playutils.py | 2 +- jellyfin_kodi/jellyfin/api.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jellyfin_kodi/helper/playutils.py b/jellyfin_kodi/helper/playutils.py index ad9c377f..9c69980b 100644 --- a/jellyfin_kodi/helper/playutils.py +++ b/jellyfin_kodi/helper/playutils.py @@ -558,7 +558,7 @@ class PlayUtils(object): path = os.path.join(temp, filename) try: - response = requests.get(src, stream=True, verify=False) + response = requests.get(src, stream=True, verify=settings('sslverify.bool')) response.raise_for_status() except Exception as error: LOG.exception(error) diff --git a/jellyfin_kodi/jellyfin/api.py b/jellyfin_kodi/jellyfin/api.py index ed4d4463..67555741 100644 --- a/jellyfin_kodi/jellyfin/api.py +++ b/jellyfin_kodi/jellyfin/api.py @@ -4,10 +4,10 @@ from __future__ import division, absolute_import, print_function, unicode_litera import json import requests +from six import ensure_str from ..helper.utils import settings from ..helper import LazyLogger -from six import ensure_str LOG = LazyLogger(__name__) @@ -388,8 +388,7 @@ class API(object): "data": data } - if not settings('sslverify.bool'): - request_settings["verify"] = False + request_settings["verify"] = settings('sslverify.bool') LOG.info("Sending %s request to %s" % (method, path)) LOG.debug(request_settings['timeout'])