From 67d4087e3ad4cc67879fb1ce65540bb92897111e Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Thu, 15 Jan 2026 16:18:25 +0100 Subject: [PATCH] Changed secret key deployment; Updated requirements due to vulnerability in urllib --- VorgabenUI/settings.py | 9 ++++----- argocd/deployment.yaml | 2 +- pages/templates/base.html | 2 +- requirements.txt | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/VorgabenUI/settings.py b/VorgabenUI/settings.py index e35a33a..b7e9811 100644 --- a/VorgabenUI/settings.py +++ b/VorgabenUI/settings.py @@ -20,12 +20,13 @@ BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = False + # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ.get('VORGABENUI_SECRET') if not SECRET_KEY: - # Use DEBUG environment variable or assume debug mode for local development - debug_mode = os.environ.get('DEBUG', 'True').lower() in ('true', '1', 'yes', 'on') - if debug_mode: + if DEBUG: # Fixed fallback key for local development only SECRET_KEY = 'dev-fallback-key-for-local-debugging-only-not-for-production-use-12345' import logging @@ -33,8 +34,6 @@ if not SECRET_KEY: else: raise ValueError("VORGABENUI_SECRET environment variable is required") -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True ALLOWED_HOSTS = ["10.128.128.144","localhost","127.0.0.1","*"] diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml index 2fd3041..4ef072d 100644 --- a/argocd/deployment.yaml +++ b/argocd/deployment.yaml @@ -25,7 +25,7 @@ spec: mountPath: /data containers: - name: web - image: git.baumann.gr/adebaumann/vui:0.976 + image: git.baumann.gr/adebaumann/vui:0.977 imagePullPolicy: Always env: - name: VORGABENUI_SECRET diff --git a/pages/templates/base.html b/pages/templates/base.html index 81e4f1e..f5ed5fd 100644 --- a/pages/templates/base.html +++ b/pages/templates/base.html @@ -219,7 +219,7 @@

-

Version {{ version|default:"0.976" }}

+

Version {{ version|default:"0.977" }}

diff --git a/requirements.txt b/requirements.txt index d76e079..e1669db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,7 +30,7 @@ pyxdg==0.28 requests==2.32.5 six==1.17.0 sqlparse==0.5.3 -urllib3==2.6.0 +urllib3==2.6.3 wcwidth==0.2.13 bleach==6.1.0 coverage==7.6.1