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

JPG and JPEG attachments do not show up within messages from some providers #9685

Open
2 tasks done
gianlucagiacometti opened this issue Oct 31, 2024 · 7 comments
Open
2 tasks done

Comments

@gianlucagiacometti
Copy link
Contributor

Prerequisites

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

Describe the issue

When I receive messages with attached .jpeg or .jpg files from some providers (Exchange and Gmail included), I see the clip in the message list but no attachment shows up either in the message preview or in the message if I double-click it.
If I forward to myself from my phone with Aquamail, it shows correctly.

This issue does not happen if I receive other type of attachments (.png, .pdf).

I have the latest roundcube git version updated today and I tried in all my 3 servers (with the same php8.3).

I checked the source and the attachment is there:


--0000000000003977590625b291eb
Content-Type: image/jpeg; 
	name="nice_pic.jpeg"
Content-Disposition: attachment; 
	filename="nice_pic.jpeg"
Content-Transfer-Encoding: base64
Content-ID: <f_m2vz2apx0>
X-Attachment-Id: f_m2vz2apx0

and goes on with encoded jpeg

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

Chrome, Edge, Firefox, Other

What version of PHP are you using?

v8.3

What version of Roundcube are you using?

1.7-git

JavaScript errors

no errors in the console

PHP errors

no errors in log file

@gianlucagiacometti
Copy link
Contributor Author

Hi Alec,
I can provide any information that you think can be useful.
Maybe I can send you the full source of one message with the problem.
I attach two screenshot to show the issue (coming from a gmail account).
That also happens with all plugins disabled.
Screenshot 2024-11-03 101031
Screenshot 2024-11-03 101054

Thank you in advance

@gianlucagiacometti
Copy link
Contributor Author

I also tried with my phone and duckduckgo browser. Same problem.

@pabzm
Copy link
Member

pabzm commented Nov 20, 2024

This might be related to or the same as #9565. Can you check if this behaviour exists with Roundcubemail v1.6.9, too?

@gianlucagiacometti
Copy link
Contributor Author

Hi @pabzm
The v1.6.9 seems working perfectly, the jpg image is both visible at the end of the message and as a clickable link on top of the message.

@pabzm
Copy link
Member

pabzm commented Dec 18, 2024

Can you maybe share the problematic email, e.g. by uploading it as a file to this PR?

If not, could you please show an outline of the messages mime-structure? And if it's multipart/alternative, please check if the image's Content-Id f_m2vz2apx0 is referenced anywhere in the HTML-part?

@gianlucagiacometti
Copy link
Contributor Author

Here are extracts of the source code from the same message.
The first one (not working) comes straight from Google
The second one is the forward I did to myself with Aquamail from my mobile phone
I just changed the names of senders and recipients for privacy reasons

I checked and the attachment id f_m4n674et0 is only mentioned in this section twice as you can see

NOT WORKING

....
--00000000000000f0c80629385fe7
Content-Type: multipart/alternative; boundary="00000000000000f0c30629385fe5"

--00000000000000f0c30629385fe5
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hugs !

---------- Forwarded message ---------
De : Sender name <sender.name@gmail.com>
Date: ven. 13 d=C3=A9c. 2024 =C3=A0 20:58
Subject: Stage 222 23 f=C3=A9vrier 2025
To: Recipient name <recipient.name@gmail.com>

--=20
=E7=84=A1=E5=BE=97=E4=BC=9A  INTERNATIONAL ADDRESS: http://mywebsite.org

"Bienheureux les f=C3=AAl=C3=A9s, car ils laisseront passer la lumi=C3=A8re=
. "
Michel Audiard=EF=BB=BF

--00000000000000f0c30629385fe5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,=
sans-serif;font-size:large">Hugs !<br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">---------- Forw=
arded message ---------<br>De=C2=A0: <b class=3D"gmail_sendername" dir=3D"a=
uto">Sender Name</b> <span dir=3D"auto">&lt;<a href=3D"mailto:sender=
.name@gmail.com">sender.mail@gmail.com</a>&gt=
;</span><br>Date: ven. 13 d=C3=A9c. 2024 =C3=A0=C2=A020:58<br>Subject: Stag=
e 222 23 f=C3=A9vrier 2025<br>To: Previuos recipient &lt;<a href=
=3D"mailto:recipient@gmail.com">recipient@gmail.com</a>&gt;<br></div><br><b=
r><div dir=3D"ltr"><br></div>
</div><div><br clear=3D"all"></div><br><span class=3D"gmail_signature_prefi=
x">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=
=3D"gmail_signature">=E7=84=A1=E5=BE=97=E4=BC=9A =C2=A0INTERNATIONAL ADDRES=
S: <a href=3D"http://mywebsite.org" target=3D"_blank">http://mywebsite.org<=
/a><br><br>&quot;Bienheureux les f=C3=AAl=C3=A9s, car ils laisseront passer=
 la lumi=C3=A8re.=C2=A0&quot;<br>Michel Audiard=EF=BB=BF<br><br><br><br><br=
><br><br></div></div>

--00000000000000f0c30629385fe5--
--00000000000000f0c80629385fe7
Content-Type: image/jpeg; name="=?UTF-8?B?U3RnIEFpa2kgLSBTQiAtIDIyLTIzIEZlzIF2IDIwMjUu?=
	=?UTF-8?B?anBn?="
Content-Disposition: attachment; 
	filename="=?UTF-8?B?U3RnIEFpa2kgLSBTQiAtIDIyLTIzIEZlzIF2IDIwMjUuanBn?="
Content-Transfer-Encoding: base64
Content-ID: <f_m4n674et0>
X-Attachment-Id: f_m4n674et0

/9j/4AAQSkZJRgABAQABLAEsAAD/4QB0RXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA.........
.......... etc etc
--00000000000000f0c80629385fe7--

WORKING

...
This is a multi-part message in MIME format.
--193d940e07770ed289db7fcea1
Content-Type: multipart/alternative; boundary="193d940e07770ed289d8eaf708"

--193d940e07770ed289d8eaf708
Content-Type: text/plain; format=flowed; charset="UTF-8"
Content-Transfer-Encoding: 8bit



--- Forwarded message ---
From: sender.name@gmail.com
Date: 14 December 2024 11:25:53
Subject: Fwd: Stage 222 23 février 2025
To: Myself php@myname.it


Hugs !

---------- Forwarded message ---------
De : Previous sender <previous.sender@gmail.com>
Date: ven. 13 déc. 2024 à 20:58
Subject: Stage 222 23 février 2025
To: Previous recipient <prev.recipient@gmail.com>


-- 
無得会  INTERNATIONAL ADDRESS: http://mywebsite.org

"Bienheureux les fêlés, car ils laisseront passer la lumière. "
Michel Audiard


--193d940e07770ed289d8eaf708
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.=
w3.org/TR/html4/loose.dtd">
<html>
<body>
<div dir=3D"auto">
<div dir=3D"auto"><br></div><div dir=3D'auto'><br></div>
<div id=3D"aqm-original" style=3D"color: black;">
<!-- body start -->
<div class=3D"aqm-original-body">
<div style=3D"color: black;">
<table style=3D"color: black; font-size: 10pt; font-family: sans-serif;" bo=
rder=3D"0" cellspacing=3D"0" cellpadding=3D"2px">
<tbody><tr><td colspan=3D"2">--- Forwarded message ---</td></tr>
<tr><td valign=3D"top"><b>From:&nbsp;</b></td><td valign=3D"top">Prev recipie=
nt prev.recipient@gmail.com</td></tr>
<tr><td valign=3D"top"><b>Date:&nbsp;</b></td><td valign=3D"top">14 Decembe=
r 2024 11:25:53</td></tr>
<tr><td valign=3D"top"><b>Subject:&nbsp;</b></td><td valign=3D"top">Fwd: St=
age Dombasle 222 23 f=C3=A9vrier 2025</td></tr>
<tr><td valign=3D"top"><b>To:&nbsp;</b></td><td valign=3D"top">My=
self@mydomain.it</td></tr>
</tbody></table>
<br>
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,=
sans-serif;font-size:large">Hugs !<br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">---------- Forw=
arded message ---------<br>De&nbsp;: <b class=3D"gmail_sendername" dir=3D"a=
uto">Previous sender</b> <span dir=3D"auto">&lt;<a href=3D"mailto:previous=
.sender@gmail.com">previous.sender@gmail.com</a>&gt=
;</span><br>Date: ven. 13 d=C3=A9c. 2024 =C3=A0&nbsp;20:58<br>Subject: Stag=
e 222 23 f=C3=A9vrier 2025<br>To: Previous recipient &lt;<a href=
=3D"mailto:prev.recipient@gmail.com">prev.recipient@gmail.com</a>&gt;<br></div><br><b=
r><div dir=3D"ltr"><br></div>
</div><div><br clear=3D"all"></div><br><span class=3D"gmail_signature_prefi=
x">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=
=3D"gmail_signature">=E7=84=A1=E5=BE=97=E4=BC=9A &nbsp;INTERNATIONAL ADDRES=
S: <a href=3D"http://mywebsite.org" target=3D"_blank">http://mywebsite.org<=
/a><br><br>"Bienheureux les f=C3=AAl=C3=A9s, car ils laisseront passer la l=
umi=C3=A8re.&nbsp;"<br>Michel Audiard=EF=BB=BF<br><br><br><br><br><br><br><=
/div></div>
</div>
</div>
<!-- body end -->

</div><div dir=3D"auto"><br></div>
</div></body>
</html>

--193d940e07770ed289d8eaf708--
--193d940e07770ed289db7fcea1
Content-Disposition: attachment; filename="=?UTF-8?B?U3RnIEFpa2kgLSBTQiAtIDIyLTIzIEZlzIF2IDIwMjUuanBn?="; modification-date="Tue, 17 Dec 2024 10:48:24 +0100"
Content-Type: image/jpeg; name="=?UTF-8?B?U3RnIEFpa2kgLSBTQiAtIDIyLTIzIEZlzIF2IDIwMjUuanBn?="
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQABLAEsAAD/4QB0RXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA.........
.......... etc etc
--193d940e07770ed289db7fcea1--

@pabzm
Copy link
Member

pabzm commented Dec 18, 2024

Thank you for the details!

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

No branches or pull requests

3 participants