Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attached picture is not shown if text-part is present in multipart/mixed and image-part as Content-ID #9565

Open
1 of 2 tasks
olegStreejak opened this issue Jul 31, 2024 · 6 comments · May be fixed by #9585
Open
1 of 2 tasks
Assignees
Labels

Comments

@olegStreejak
Copy link

Prerequisites

  • I have searched for duplicate or closed issues
  • I can recreate the issue with all plugins disabled

Describe the issue

Hello

I've composed two similar mails from two public email interfaces (gmail and yandex-mail) and attached an jpeg
тест
w/ russian characters in filename (тест.jpg).

Here
1
you can see email from gmail - there's no in-line shown attachment, but it detects that the mail has an attachment

And now you can see
2
email from yandex-mail and the attachment shown as expected

I downloaded source text for these mails and here's the diff in content part:
diff

My environment is Chromium ver. 126.0.6478.126 (official build), for Linux Mint (64 bit)

Hope that's enough info for eliminating the bug
WBR, Oleg

What browser(s) are you seeing the problem on?

Other

What version of PHP are you using?

8.2.21

What version of Roundcube are you using?

1.7-git [GIT 20240728.1158]

JavaScript errors

No response

PHP errors

No response

@pabzm
Copy link
Member

pabzm commented Aug 13, 2024

Thank you for the report!

Could you provide us with the (relevant parts of) both messages so we can debug this further?

What makes you think the russian characters are the problem? Did you test with similar messages having filenames with ASCII-characters only?

@olegStreejak
Copy link
Author

olegStreejak commented Aug 13, 2024

Thank you for the response! Surely I can send you .eml files - what email should I send'em? Or I can post it here, but I'll have to cut the headers like Received:, Return-Path:, etc.
What'd you prefer?

update: that's the zip with stripped .emls
test.zip
the picture I'd sent you cat see at the top post. empty test.eml - the mail sent from gmail, another one - from one of russian mass-mailbox hoster

I've tried only russian symbols in filenames. As far as I know there's no problem w/ ASCII-only filenames

If you still need real .eml files write here email address to send'em

@pabzm pabzm added bug and removed need feedback labels Aug 14, 2024
@pabzm
Copy link
Member

pabzm commented Aug 14, 2024

Thank you for the messages!

The problem ist not any character or encoding but Roundcube loses the image as long as the message contains a text/plain part. Such a part is only contained in the gmail-email. The display area is blank because the text-part is empty. But Roundcube also loses the image if the text-part is non-empty.

@pabzm pabzm changed the title it doesn't show attached picture from gmail if filename consists of russian (possibly any non-latin) characters Attached picture is not shown if text-part is present in multipart/mixed Aug 14, 2024
@olegStreejak
Copy link
Author

I have to correct myself - there's such a problem even with ascii-only filename: one of my colleague just sent me such attachment, and I see only the clip-icon at the message-list area but no attachment at all

@pabzm pabzm self-assigned this Aug 14, 2024
@pabzm pabzm linked a pull request Aug 15, 2024 that will close this issue
@pabzm
Copy link
Member

pabzm commented Aug 15, 2024

Curiously enough there's another condition to this bug: it only happens if a text/plain-part if present and if the image-part has a Content-ID.

I fail to understand the role of the text-part, but the other condition brought me on the right track and I made a fix: #9585

@pabzm pabzm changed the title Attached picture is not shown if text-part is present in multipart/mixed Attached picture is not shown if text-part is present in multipart/mixed and image-part as Content-ID Aug 15, 2024
@olegStreejak
Copy link
Author

FYI: under recently released build 1.6.9 the attached picture is shown in all cases/e-mails.
Under 1.7-git [GIT 20240902.1454] - as it was when I initiate this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants