znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
343 stars 83 forks source link

Inline image attachments detection fixes #386

Open pboguslawski opened 1 year ago

pboguslawski commented 1 year ago

Proposed change

Znuny does not recognize inline attachments when formated with whitespaces like test1.png in sample e-mail added in this commit:

 <IMG
             SRC = '
     cid:part1.E5AE6B6E.C188FB97@host1.test'
 alt="" class="">

Thunderbird recognizes it and displays as inline image.

When forwarding HTML messages Znuny skips attachments that have Content-ID somewhere in HTML message body, not in src attribute. This may cause poorly attached inline images (like test2.png in sample e-mail added in this commit) to be absent in forwarded message.

This mod fixes above issues, removes redundant replace operations and fixes inconsistent CID searching regexps.

Type of change

Additional information

Replaces: https://github.com/znuny/Znuny/pull/83 Related: https://github.com/OTRS/otrs/pull/1256 Author-Change-Id: IB#1052680

Checklist