Skip to content

Commit

Permalink
Merge pull request #74 from demisto/ilappe/XSUP-26948/fix_for_embedde…
Browse files Browse the repository at this point in the history
…d_images

parse-emails: better fix for inline images
  • Loading branch information
moishce authored Sep 26, 2023
2 parents 9b0cdbf + 60c0fe6 commit 9c0aea1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
v0.1.18
* Fixed an issue where inline image did not parse.

v0.1.17
* Fixed an issue where several unicode spaces weren't parsed as expected.

Expand Down
3 changes: 2 additions & 1 deletion parse_emails/handle_eml.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def handle_eml(file_path, b64=False, file_name=None, parse_only_headers=False, m

elif part.get_filename()\
or "attachment" in part.get("Content-Disposition", "")\
or part.get("X-Attachment-Id"):
or part.get("X-Attachment-Id")\
or ("image" in part.get("Content-Type", '') and part.get("Content-Transfer-Encoding") == "base64"):

attachment_content_id = part.get('Content-ID')
attachment_content_disposition = part.get('Content-Disposition')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "parse-emails"
version = "0.1.17"
version = "0.1.18"
description = "Parses an email message file and extracts the data from it."
authors = ["Demisto"]
license = "MIT"
Expand Down

0 comments on commit 9c0aea1

Please sign in to comment.