TheHive-Project / TheHive-Project/Cortex-Analyzers
[Bug][EmlParser] Problem running the analyzer if an attachment contains the character "?"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 490
- Forks
- 405
- Avg merge
- 2d 43m
- Merged PRs (30d)
- 8
Description
Describe the bug
If the EML message contains an attachement with file name contains "?" character, EmlParser not working
To Reproduce
Steps to reproduce the behavior:
- Send an e-mail with attachement filename contains ?
Or - Edit EML filename for modify this values
Content-Type: application/msword; name="2 - test?.doc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="2 - test?.doc"
Error message :
Report creation failure: [Invalid format for artifact.attachment: FileInputValue(1 - ??????.pdf,/tmp/cortex-job-34c8fXsB4PrCcvtTyvV3-3558916277537544/output/tmp2wd7gamn,application/octet-stream), expected attachment]

Work environment
- Client OS: Windows 10
- Server OS: CentOS 7
- Browse type and version:
- Cortex version: 3.1.1-1
- Cortex Analyzer/Responder name: EmlParser
- Cortex Analyzer/Responder version: 2.0
Thanks,
Regards,
Nicolas
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the EmlParser analyzer and reproduce the failure with the sample EML attachment whose filename contains "?". Trace attachment parsing and report creation; done means the attachment is accepted and the analyzer completes successfully with the filename preserved or safely handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100