diff --git a/src/config.ini b/src/config.ini index 8305a50..9527b6e 100644 --- a/src/config.ini +++ b/src/config.ini @@ -25,10 +25,10 @@ log_level = DEBUG [account] username = dselen -password = $2b$12$bUcVL2v0OoJnraXtx.mHsOKFRnKEf/kmewqKXHOebitDZcJviPusm +password = $2b$12$LId4p4WP3N0RLFi/TjNxseA1U.yybg2bJ8ufvcbpclUxckEX6OH.y enable_totp = False totp_verified = False -totp_key = CEBHHGL4HLYUDYXKTLIL34SVLXYPVHIO +totp_key = NY7VFZFYIUM7FUZCDW7UMXQ7DMGGLSJU [other] welcome_session = False diff --git a/src/main.py b/src/main.py index 87680aa..23fe8b9 100644 --- a/src/main.py +++ b/src/main.py @@ -21,6 +21,7 @@ if __name__ == '__main__': # Read the config file (ini) ok, config_data = config.read() if not ok: + log.error("failed to read the config from disk") exit(1) found, config_server = config.filter(config_data, 'SERVER') diff --git a/src/modules/config/config.py b/src/modules/config/config.py index 1d42653..844b1c5 100644 --- a/src/modules/config/config.py +++ b/src/modules/config/config.py @@ -34,6 +34,7 @@ class config(): ok, config_data = config_utils.read_data(candidate_path) if not ok: + log.error("failed to read data from filepath") return False, {} return True, config_data diff --git a/src/modules/database/database.py b/src/modules/database/database.py index a426c5b..cd8c154 100644 --- a/src/modules/database/database.py +++ b/src/modules/database/database.py @@ -13,6 +13,7 @@ class database(): def create_session(database_config: dict) -> tuple[bool, sqlalchemy.engine.Engine | None, sqlalchemy.orm.Session | None]: ok, connection_string = database_utils.generate_connection_string(database_config) if not ok: + log.error("failed to generate the connection string") return False, None, None try: diff --git a/src/modules/routes/locale.py b/src/modules/routes/locale.py index d961bc5..f227efc 100644 --- a/src/modules/routes/locale.py +++ b/src/modules/routes/locale.py @@ -27,6 +27,7 @@ class localeman: def get_language(self): ok, server_config = config.filter(self.wgd_config, "SERVER") if not ok: + log.error("failed to filter the config in-memory") return None lang = server_config.get("wgdashboard_language", "en") diff --git a/src/modules/routes/routes_welcome.py b/src/modules/routes/routes_welcome.py index 9db7cd5..9337424 100644 --- a/src/modules/routes/routes_welcome.py +++ b/src/modules/routes/routes_welcome.py @@ -67,7 +67,6 @@ def api_welcome_get_totp(): if "totp_verified" not in config_account or not config_account["totp_verified"]: totp_key = pyotp.random_base32() - log.debug(totp_key) ok = config.update('ACCOUNT', 'totp_key', totp_key) if not ok: log.error("failed to update the key in the configuration file")