v0.0.32: фиксы по ревью — единый обфускатор, рекурсия ZIP, кириллица 1С, дедуп, SSE-дисконнект
Deploy drhider / validate (push) Canceled after 0s

This commit is contained in:
“Naeel”
2026-08-18 23:03:31 +04:00
parent c3c6e5b584
commit 94e588aaba
6 changed files with 220 additions and 103 deletions
+6
View File
@@ -21,6 +21,9 @@ from typing import Dict, List, Tuple, Optional
TTL_SECONDS = 30 * 60 # 30 минут
# Максимальный суммарный объём файлов в одной сессии (защита памяти)
MAX_SESSION_BYTES = 500 * 1024 * 1024 # 500 MB
_sessions: Dict[str, dict] = {}
_lock = threading.Lock()
@@ -73,6 +76,9 @@ def add_file(sid: str, filename: str, content: bytes) -> bool:
s = _sessions.get(sid)
if not s:
return False
total = sum(len(c) for _, c in s["files"])
if total + len(content) > MAX_SESSION_BYTES:
return False # превышен суммарный лимит сессии
s["files"].append((filename, content))
return True