Skip to content

fix(media): accept .potx PowerPoint templates in content scanner - #2196

Open
syf2211 wants to merge 1 commit into
netclaw-dev:devfrom
syf2211:fix/potx-mime-type-support
Open

syf2211 wants to merge 1 commit into
netclaw-dev:devfrom
syf2211:fix/potx-mime-type-support

Conversation

@syf2211

@syf2211 syf2211 commented Sep 18, 2026

Copy link
Copy Markdown

Summary

Register the PowerPoint template MIME type (application/vnd.openxmlformats-officedocument.presentationml.template) so .potx uploads pass the content scanner instead of being rejected as unsupported.

Motivation

Fixes #1459. The content scanner already accepts other ZIP-backed OOXML Office formats (e.g. .pptx), but .potx templates were missing from the MIME catalog and magic-byte validator.

Changes

  • Add .potx to MimeTypeCatalog with native ZIP signature validation
  • Add matching IsZip matcher in MagicByteValidator
  • Include .potx in IsZipBackedOfficePath so FileReadTool resolves the correct document MIME when magic bytes detect ZIP
  • Add unit tests for extension mapping and ZIP signature acceptance

Tests

  • dotnet test src/Netclaw.Media.Tests/Netclaw.Media.Tests.csproj — 66 passed
  • dotnet test src/Netclaw.Security.Tests/Netclaw.Security.Tests.csproj — 1162 passed

Notes

Scope is limited to .potx as reported in the issue. Other OOXML template types (e.g. .dotx, .xltx) can be added in follow-up PRs if needed.

Add application/vnd.openxmlformats-officedocument.presentationml.template
to MimeTypeCatalog and MagicByteValidator so .potx uploads pass the
ZIP-backed OOXML signature check.

Fixes netclaw-dev#1459
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.

Content scanner rejects .potx files (MIME type not supported)

1 participant