From a0949982ca51ff4961bc191e988eceb7a829ea08 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 6 Sep 2023 10:24:18 -0400 Subject: [PATCH 1/2] update the config creation logic to avoid the injection --- app/configs/user_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/configs/user_config.py b/app/configs/user_config.py index 67b9568c..f4f9ecfa 100644 --- a/app/configs/user_config.py +++ b/app/configs/user_config.py @@ -5,6 +5,7 @@ import configparser import os import time +from pathlib import Path from app.models.singleton import Singleton from app.services.crypto.crypto import decryption @@ -25,7 +26,7 @@ def __init__(self): if not os.path.exists(AppConfig.Env.user_config_path): os.makedirs(AppConfig.Env.user_config_path) if not os.path.exists(AppConfig.Env.user_config_file): - os.system(r'touch {}'.format(AppConfig.Env.user_config_file)) + Path.touch(Path(AppConfig.Env.user_config_file)) self.config = configparser.ConfigParser() self.config.read(AppConfig.Env.user_config_file) if not self.config.has_section('USER'): From c94397cb3c47739323eb72abbb95ca8d690be319 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 6 Sep 2023 10:30:46 -0400 Subject: [PATCH 2/2] bumpup version --- app/resources/custom_help.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/resources/custom_help.py b/app/resources/custom_help.py index cbd0994a..ea53422a 100644 --- a/app/resources/custom_help.py +++ b/app/resources/custom_help.py @@ -6,7 +6,7 @@ class HelpPage: page = { 'update': { - 'version': '2.2.3', + 'version': '2.2.4', '1': 'CLI supports to perform multi-threading upload for file/folders', '2': 'CLI supports to perform resumable upload for single file', }, diff --git a/pyproject.toml b/pyproject.toml index 99a24127..4a942f44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.2.3" +version = "2.2.4" description = "This service is designed to support pilot platform" authors = ["Indoc Research"]