Added .msg and .doc to skipArchiverMimeTypes #4544
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When scanning Jira attachments, .msg and .doc were incorrectly identified as archives by archives.Identify(), causing extraction errors during scanning.
Root Cause
The handler flow:
Detects MIME type (.msg → application/vnd.ms-outlook, .doc → application/msword
Calls archives.Identify() to check if file is an archive
If identified as an archive, attempts extraction → errors
These files aren't archives but were being treated as such.
Solution
Added skip logic to prevent archive detection for these file types:
MIME type skip: Added application/vnd.ms-outlook and application/msword to skipArchiverMimeTypes to bypass archive detection for .msg and .doc files
Impact
Prevents previously experienced errors when scanning Jira issues with .msg or attachments
Files are handled by the default handler instead of the archive handler
Minimal impact, as this only adds skip logic for these specific file types
Checklist:
make test-community)?make lintthis requires golangci-lint)?