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":{