From a20f8abb1d1bf8f70a6f903f0c68bb574e9fcdd5 Mon Sep 17 00:00:00 2001 From: Ronit Jain Date: Tue, 14 Nov 2023 02:39:20 +0530 Subject: [PATCH] preserve line ending when reading key content --- lean/components/util/encryption_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lean/components/util/encryption_helper.py b/lean/components/util/encryption_helper.py index a895fa12..b4aa6198 100644 --- a/lean/components/util/encryption_helper.py +++ b/lean/components/util/encryption_helper.py @@ -49,7 +49,7 @@ def get_project_key(project_key_path: Path, organization_id: str) -> str: :param project_key_path: The path to the project key file :return: The project key """ - with open(project_key_path, 'r') as f: + with open(project_key_path, 'r', encoding='utf-8', newline='') as f: content = f.read() key_for_aes = _get_fixed_length_key_from_user_full_length_key(content, organization_id.encode('utf-8')) return key_for_aes