Skip to content

fix(upload): enforce strict mp4 validation - #53

Closed
aiirvizionz wants to merge 1 commit into
moshcoder:masterfrom
aiirvizionz:clientkit/strict-mp4-upload-type
Closed

fix(upload): enforce strict mp4 validation#53
aiirvizionz wants to merge 1 commit into
moshcoder:masterfrom
aiirvizionz:clientkit/strict-mp4-upload-type

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • route tenant video uploads through the existing strict upload type helper
  • keep the tenant upload endpoint MP4-only instead of accepting every application/octet-stream payload
  • add regression coverage for substring MIME matches such as text/video/mp4

Tests

  • node --test tests*.mjs

@ralyodio ralyodio closed this in #63 Jul 31, 2026
ralyodio pushed a commit that referenced this pull request Jul 31, 2026
The inline check accepted application/octet-stream (any file) and used
an unanchored regex so substring MIME types like text/video/mp4 passed.
Route through the existing mediaTypeForUpload helper which does exact
Object.hasOwn matching and extension fallback.

Fixes #53

Co-authored-by: qwenbona <qwenbona@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant