any-env-and-bind-address #58

Merged
moon merged 7 commits from any-env-and-bind-address into dev 2025-06-13 14:54:28 -07:00
Showing only changes of commit 1a35750d0a - Show all commits

View file

@ -14,6 +14,10 @@ def get_config_file() -> str:
env: str | None = environ.get('KEMOVERSE_ENV')
if not env:
raise ConfigError('Error: KEMOVERSE_ENV is unset')
# Validate environment name contains only alphanumeric, dash, and underscore
if not re.match(r'^[a-zA-Z0-9_-]+$', env):
raise ValueError(f'KEMOVERSE_ENV "{env}" contains invalid characters. Only alphanumeric, dash (-), and underscore (_) are allowed.')
config_path: str = f'config_{env}.ini'