From 7775964d62a07758637c215c5b1b1e6de1a6c0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Thu, 26 May 2022 15:57:14 +0200 Subject: [PATCH 1/2] Added never cache to indes --- server/src/uds/web/views/modern.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/uds/web/views/modern.py b/server/src/uds/web/views/modern.py index f7b872e6..d840303b 100644 --- a/server/src/uds/web/views/modern.py +++ b/server/src/uds/web/views/modern.py @@ -38,6 +38,8 @@ from django.http import HttpRequest, HttpResponse, JsonResponse, HttpResponseRed from django.urls import reverse from uds.core.util.request import ExtendedHttpRequest, ExtendedHttpRequestWithUser +from django.views.decorators.cache import never_cache + from uds.core.auths import auth, exceptions from uds.web.util import errors from uds.web.forms.LoginForm import LoginForm @@ -51,6 +53,7 @@ logger = logging.getLogger(__name__) CSRF_FIELD = 'csrfmiddlewaretoken' +@never_cache def index(request: HttpRequest) -> HttpResponse: # Gets csrf token csrf_token = csrf.get_token(request) From 9343f7c263aea476360ef327b14f619840b3fe13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 3 Jun 2022 13:44:00 +0200 Subject: [PATCH 2/2] Added CERTIFICATE_BUNDLE_PATH possible variable on environment to check certificates --- client-py3/full/src/uds/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client-py3/full/src/uds/tools.py b/client-py3/full/src/uds/tools.py index 8f3fa05c..d82baf66 100644 --- a/client-py3/full/src/uds/tools.py +++ b/client-py3/full/src/uds/tools.py @@ -247,6 +247,10 @@ def verifySignature(script: bytes, signature: bytes) -> bool: def getCaCertsFile() -> typing.Optional[str]: # First, try certifi... + # If environment contains CERTIFICATE_BUNDLE_PATH, use it + if 'CERTIFICATE_BUNDLE_PATH' in os.environ: + return os.environ['CERTIFICATE_BUNDLE_PATH'] + try: if os.path.exists(certifi.where()): return certifi.where()