Skip to content

fix(web): validate attachment filename types - #380

Open
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:feat/issue-344-attachment-type-safety
Open

fix(web): validate attachment filename types#380
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:feat/issue-344-attachment-type-safety

Conversation

@seekskyworld

Copy link
Copy Markdown

Problem

Adds the MIME/filename consistency slice of #344. Attachment admission could accept a filename whose extension contradicted its declared content type.

Value

Future upload paths get a clearer fail-closed boundary against misleading or malformed attachment metadata.

Approach

Require supported MIME types to use an allowed filename extension while retaining count, traversal, per-file, and aggregate byte limits.

Validation

  • npx tsc --noEmit
  • git diff --check

Impact

  • User-visible behavior: invalid type/extension pairs are rejected.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: none.
  • Persisted config/data: none.
  • Compatibility/risk: additive validation for future attachment admission.

Signed-off-by: seekskyworld <djh1813553759@gmail.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