mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #96] Images not displaying when multiple cid names overlaps #66
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lpotherat on GitHub (Apr 21, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/96
Hi, there is an issue when two cid share a common part in their name.
Create a mail with two images, with these cid :
Content-ID:
Content-ID:
And a body with this:
<img src="cid:logo"/>
<img src="cid:logofooter"/>
Expected behaviour :
<img src="http://mailpit:8025/api/v1/message/f2e15ca6-9701-4786-aadc-93d9419081b4/part/2.2 "/>
<img src="http://mailpit:8025/api/v1/message/f2e15ca6-9701-4786-aadc-93d9419081b4/part/2.2 "/>
Actual behaviour :
<img src="http://mailpit:8025/api/v1/message/f2e15ca6-9701-4786-aadc-93d9419081b4/part/2.2 "/>
<img src="http://mailpit:8025/api/v1/message/f2e15ca6-9701-4786-aadc-93d9419081b4/part/2.2footer "/>
I think the problem is located here :
/server/ui-src/App.vue#L228
/server/ui-src/App.vue#L247
maybe the regex should assume a terminating character like one of [whitespace]'"> to avoid those overlaps ?
Thank for the awesome work by the way :)
@axllent commented on GitHub (Apr 21, 2023):
Hi there! I remember when I wrote this functionality, having a huge issue specifically with older Outlook-generated emails (Word), not too mention all the other broken web clients etc. There is so much inconsistency between them - some did not enclose the SRC in quotes at all, others had the CID followed by an actual filename, etc. Really inconsistent. But your issue is a valid one, this shouldn't be happening.
I'm just about to leave for a short holiday, so will only be able to look into this later next week. In the meantime, could you please construct an example email that demonstrates this issue (removing any personal data), and attach it to this issue? That will save me heaps of time to replicate what you are experiencing. Thanks!
@axllent commented on GitHub (Apr 24, 2023):
I have adjusted the regex to (hopefully) eliminate overlapping CID names, which should address your problem. This has been released in v1.6.4. Please feel free to re-open this issue if you still experience issues, thank you.
@lpotherat commented on GitHub (Apr 26, 2023):
It works like a charm, thank you for the quick fix 👍
Sorry for the delay !