Roundcube Community Forum

Release Support => Pending Issues => Topic started by: tomsa on July 02, 2021, 08:17:44 AM

Title: Roundcube is attaching base64 encoded image in signature on replies
Post by: tomsa on July 02, 2021, 08:17:44 AM
Hello,

I have developed a tool at my work so that everyone can generate a corporate email signature.
The tool encodes the logo and social networks images in base64 to avoid attached files in messages.

It is working fine with every email clients. I just have a problem with the webmail powered by Roundcube (I don't know which version we use yet but I have asked for that information). When you receive a message with an html signature in Roundcube it is ok (no attached files). But when you reply or forward a message with a signature, Roundcube is adding the base64 images in the attached files of the message.

I would like to know if it is a normal behavior (or something wrong with my code) and if there is something to prevent that behavior in the configuration (or the plugins) of Roundcube.

Thank you for looking at my issue and have a nice day!

Best,

Tomsa
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: alec on July 03, 2021, 03:41:33 AM
This is normal behavior and you can't disable it. I think it was added in the days when most email clients didn't support image data: URIs. I really don't know if we can just remove this feature these days.
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: tomsa on July 05, 2021, 02:02:50 AM
This is normal behavior and you can't disable it. I think it was added in the days when most email clients didn't support image data: URIs. I really don't know if we can just remove this feature these days.

Hello Alec and thank you for your answer.

It makes sense. I now understand why the base64 image are displaying correctly when you receive a message but are then switched to attached images when replying or transferring a message.

I think this is something that can be changed because now most clients are supporting base64 images very well (even Outlook). If a company use Roundcube and a signature with base64 images, the conversation can quickly be flooded with attached images from the signature. Base64 is used to avoid that behavior in all other email clients. Is there a way to submit that change to the dev team?

Thank you for your help!
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: alec on July 05, 2021, 02:16:35 AM
You can send a pull request. The code is here: https://github.com/roundcube/roundcubemail/blob/78af81ed87da63048176cb8d963e2b2d49aa4080/program/include/rcmail_sendmail.php#L347
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: tomsa on July 05, 2021, 02:47:58 AM
You can send a pull request. The code is here: https://github.com/roundcube/roundcubemail/blob/78af81ed87da63048176cb8d963e2b2d49aa4080/program/include/rcmail_sendmail.php#L347

Thank you Alec, I made my first pull request :)

Is it possible to comment this line in our Roundcube application to prevent this behavior or it is more complicated?
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: tomsa on July 05, 2021, 02:59:56 AM
I see that you closed my pull request. I opened it there because I can't open a pull request in Master.

(https://i.ibb.co/RQzdQHv/Capture-d-e-cran-2021-07-05-a-08-56-02.png)

I opened a new one into release-1.4 from master. I hope this is what you expect.

Thank you!

Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: JohnDoh on July 05, 2021, 04:48:05 AM
you need to create the PR using a branch in your own fork of the repo, the PR should contain only the specific commit(s) required for what you are proposing. see https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: tomsa on July 05, 2021, 05:33:44 AM
Hi John,

Thank you for the explainations.
I have never used Github so the beginning is a bit difficult for me but I am going to figure out.
Title: Re: Roundcube is attaching base64 encoded image in signature on replies
Post by: tomsa on July 05, 2021, 06:12:53 AM
After making a fork and modifying a branch, I did another pull request and hope it is ok like this.
Thank you very much for your time.

Best,

Guillaume