roundcube / roundcubemail

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

Problem on forward/reply on Inline image attachment with same name on message #7455

Closed lucasmarin closed 4 years ago

lucasmarin commented 4 years ago

If a message have 2 or more image attachment used on message content (inline) with same name. When the messge is forwarded/replied , all images of that name will be presented with content of the first part with that name.

Message example with error: message_with_error

I replace the name of attachment on that message and the error not occurs: same_message_with_attachment_name_replaced

Tested on Thunderbird and the attachments are replaced on body content correctly.

RC Version: 1.4.6

alecpl commented 4 years ago

What version? I think this was fixed.

lucasmarin commented 4 years ago

RC Version: 1.4.6

alecpl commented 4 years ago

I'm unable to reproduce. Is this a new installation or upgraded? Maybe something went wrong with update. Please, describe your environment, PHP version, IMAP server, etc. Try with disabled all plugins. Enable imap_debug and provide BODYSTRUCTURE response.

lucasmarin commented 4 years ago

Closing issue.

I ran it on pure RC with minimal configurations and it is not happened.

Sorry for misunderstood and thanks for your quick response.

lucasmarin commented 4 years ago

Hi @alecpl. I saw that error is in database_attachments plugin.

The id generated to cached attachment may not unique.

https://github.com/roundcube/roundcubemail/blob/5b531611987249faa5a4c92a8c2ddccd4a4fa435/plugins/database_attachments/database_attachments.php#L155:L162

I created a PR to fix it. https://github.com/roundcube/roundcubemail/pull/7463

alecpl commented 4 years ago

Nice catch. Thanks. It is fixed now also for redundant_attachments plugin.