roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.84k stars 1.63k forks source link

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

Open olegStreejak opened 2 months ago

olegStreejak commented 2 months ago

Prerequisites

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.

olegStreejak commented 2 months ago

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 commented 2 months ago

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

olegStreejak commented 1 month ago

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