From f144097c5d3d5ffd125c17b508ef0f6122a24ed7 Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Tue, 7 Dec 2021 15:25:22 +0000 Subject: [PATCH] Bugfix: security key location --- ref-test/common/security/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ref-test/common/security/__init__.py b/ref-test/common/security/__init__.py index e6a8b3c..c43d84c 100644 --- a/ref-test/common/security/__init__.py +++ b/ref-test/common/security/__init__.py @@ -2,17 +2,17 @@ from os import environ, path from cryptography.fernet import Fernet def generate_keyfile(): - with open('.security/.encryption.key', 'wb') as keyfile: + with open('./.security/.encryption.key', 'wb') as keyfile: key = Fernet.generate_key() keyfile.write(key) def load_key(): - with open('.security/.encryption.key', 'rb') as keyfile: + with open('./.security/.encryption.key', 'rb') as keyfile: key = keyfile.read() return key def check_keyfile_exists(): - return path.isfile('.security/.encryption.key') + return path.isfile('./.security/.encryption.key') def encrypt(input): if not check_keyfile_exists():