Skip to content

fix(collector): stop treating binary types with no converter as text - #6670

Merged
timothycarambat merged 2 commits into
Mintplex-Labs:masterfrom
moneebullah25:fix/collector-unsupported-binary-mimes
Oct 9, 2026
Merged

timothycarambat merged 2 commits into
Mintplex-Labs:masterfrom
moneebullah25:fix/collector-unsupported-binary-mimes

Conversation

@moneebullah25

@moneebullah25 moneebullah25 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Type

  • ✨ feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #6667

Description

Files whose extension has no entry in SUPPORTED_FILETYPE_CONVERTERS go through isTextType(). isKnownTextMime() only rejects MIMEs listed in badMimes or whose top-level type is in nonTextTypes, so .gif, .bmp, .tiff/.tif, .heic, .doc, .xls, .ppt, .rar and .7z were classified as text and ingested through the .txt converter as garbage.

This adds their MIME types (plus image/heif, the sibling of image/heic) to badMimes, so they are rejected with the existing "not supported for parsing and cannot be assumed as text file type" message, like .exe or .zip. Types that have a converter (png, jpg, webp, etc.) are unaffected because the converter lookup happens before isTextType() is called. No image support is added.

Additional Information

Other binary MIMEs not covered by the issue (e.g. gzip/tar archives) still pass through the MIME check; left out to keep this change scoped to the reported types.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

@shatfield4 shatfield4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shatfield4 shatfield4 added the PR:Ready-to-merge PR has been reviewed by core team and is ready to merge label Oct 8, 2026
@timothycarambat
timothycarambat merged commit cbbee40 into Mintplex-Labs:master Oct 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:Ready-to-merge PR has been reviewed by core team and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Collector treats file types with no converter (.gif/.bmp/.heic/.doc/.xls/.ppt/.rar/.7z) as text

3 participants