From 1be9b6e68666cc7d64c350398b42d1908c35dc81 Mon Sep 17 00:00:00 2001 From: Bryan Gerlach Date: Sat, 10 Jan 2026 19:22:45 -0600 Subject: [PATCH] encryption stuff testing --- rdgen/settings.py | 3 ++- rdgenerator/views.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rdgen/settings.py b/rdgen/settings.py index 888b183..4101a76 100644 --- a/rdgen/settings.py +++ b/rdgen/settings.py @@ -10,6 +10,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/5.0/ref/settings/ """ import os +import base64 from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -25,7 +26,7 @@ GHUSER = os.environ.get("GHUSER", '') GHBEARER = os.environ.get("GHBEARER", '') GENURL = os.environ.get("GENURL", '') GHBRANCH = os.environ.get("GHBRANCH",'master') -RSA_PUBLIC_KEY = os.environ.get("RSA_PUBLIC_KEY",'') +RSA_PUBLIC_KEY = base64.b64decode(os.environ.get("RSA_PUBLIC_KEY_B64",'')).decode('utf-8') PROTOCOL = os.environ.get("PROTOCOL", 'https') REPONAME = os.environ.get("REPONAME", 'rdgen') diff --git a/rdgenerator/views.py b/rdgenerator/views.py index c2b9ccd..91201a7 100644 --- a/rdgenerator/views.py +++ b/rdgenerator/views.py @@ -237,7 +237,7 @@ def generator_view(request): "downloadLink": downloadLink, "compname": compname, "androidappid": androidappid, "uuid":myuuid } - hybrid_result = encrypt_payload_hybrid(sensitive_fields, _settings.GH_PUBLIC_KEY) + hybrid_result = encrypt_payload_hybrid(sensitive_fields, _settings.RSA_PUBLIC_KEY) data = { "ref": _settings.GHBRANCH, "inputs":{