ITHC: enforce container ownership on uploads

This commit is contained in:
2026-10-27 06:05:47 +00:00
parent 5e98d6e8c2
commit 65616f6307
4 changed files with 381 additions and 12 deletions
+6
View File
@@ -89,6 +89,12 @@ ID matches the requested Azure container. The existing signed-query/HMAC check
also remains required. Requests that fail ownership or HMAC validation are
rejected before the Azure storage deletion operation is called.
Ordinary JSON and multipart uploads through `/api/file/upload` and
`/api/file/uploadsinglefile` independently require a valid NextAuth session whose
user ID exactly matches the submitted `containerID`. The existing upload HMAC
remains mandatory. Missing or unusable sessions, cross-container requests, and
invalid HMACs are rejected before file processing or Azure storage writes.
Administrative cross-container representation deletion uses the dedicated
`POST /api/admin/deleteblobrep` route. That endpoint independently validates
the administrative session and requires a trusted same-origin request. It also