3 Commits

Author SHA1 Message Date
Andrey Antukh
22b6b6df57 🐛 Add concurrency limit to import-binfile RPC handler
Apply climit with 4 global permits and 1 per-profile permit (queue 2)
to prevent connection pool exhaustion from concurrent imports. Each
import holds a DB connection for its entire duration with idle
transaction timeout disabled, so unbounded concurrency could exhaust
the pool (default 60 connections).

AI-assisted-by: mimo-v2.5
2026-08-03 18:26:47 +02:00
Andrey Antukh
7807e34151 🐛 Scope assemble-chunks session lookup to profile-id
Prevent BOLA in chunked upload assembly by verifying session
ownership. The assemble-chunks function now requires a profile-id
parameter and scopes the upload_session lookup accordingly, matching
the pattern already used by upload-chunk.

All three callers (assemble-file-media-object, create-font-variant,
import-binfile) updated to pass the authenticated profile-id.

AI-assisted-by: mimo-v2.5-pro
2026-08-03 18:26:47 +02:00
Andrey Antukh
461227fe16 🐛 Close import-binfile schema and remove file-id parameter
Add :closed true to schema:import-binfile to reject unknown keys.
Remove file-id from handler destructuring, config binding, and audit
props to prevent specifying a target file on import.

AI-assisted-by: mimo-2.5-pro
2026-08-03 18:26:47 +02:00