fix: restrict env token bootstrapping to the primary user only

This commit is contained in:
Alex
2026-06-25 01:04:21 +03:00
parent 27b0edcc48
commit 3b515433b2
+1 -1
View File
@@ -67,7 +67,7 @@ async def run_sync(
async def _run_sync_locked(resolved_user_id: int, settings: Settings) -> SyncResult: async def _run_sync_locked(resolved_user_id: int, settings: Settings) -> SyncResult:
token_path = settings.token_path(resolved_user_id) token_path = settings.token_path(resolved_user_id)
if not token_path.exists() and os.getenv("SSECURITY"): if not token_path.exists() and resolved_user_id == settings.telegram_allowed_user_id and os.getenv("SSECURITY"):
_bootstrap_token_from_env(token_path) _bootstrap_token_from_env(token_path)
if not token_path.exists(): if not token_path.exists():