Skip to content

fix(media): validate upload limit config - #92

Merged
ralyodio merged 1 commit into
moshcoder:masterfrom
rissrice2105-agent:fix/media-max-bytes-config
Aug 1, 2026
Merged

fix(media): validate upload limit config#92
ralyodio merged 1 commit into
moshcoder:masterfrom
rissrice2105-agent:fix/media-max-bytes-config

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Fixes #91.

What changed

  • parse MEDIA_MAX_BYTES as a strict positive decimal integer
  • reject zero, signed, fractional, scientific, non-finite, and unsafe values
  • retain the existing 100 MB fallback so malformed deployment config cannot disable the upload cap
  • add focused coverage for valid and unsafe values

Validation

  • node --test tests/media-upload-type.test.mjs (5/5)
  • git diff --check

@ralyodio
ralyodio merged commit c0689e7 into moshcoder:master Aug 1, 2026
2 checks passed
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.

Malformed MEDIA_MAX_BYTES disables upload size enforcement

2 participants