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

Bad Content-ID formatting handling in DetectAttachment filter fixed #413

Open pboguslawski opened 1 year ago

pboguslawski commented 1 year ago

Proposed change

Znuny throws

Use of uninitialized value $ImageID in quotemeta at [...]DetectAttachment.pm line 65

error when importing e-mail message with inline image with Content-ID header value without <>. Such formatting is not allowed by RFC https://datatracker.ietf.org/doc/html/rfc2392#section-2 but is accepted Znuny in

https://github.com/znuny/Znuny/blob/rel-6_0/Kernel/System/Ticket/Article/Backend/MIMEBase/ArticleStorageFS.pm#L372

so it should tolerate it also in DetectAttachment.pm. This mod fixes it.

I also reverts 61cfc740dd3b7b93f81bf8917312eb6c39359c81 because HTML tags and attributes are case insensitive:

https://github.com/znuny/Znuny/commit/61cfc740dd3b7b93f81bf8917312eb6c39359c81#commitcomment-110812670

Type of change

Additional information

Replaces: https://github.com/znuny/Znuny/pull/192 Related: https://datatracker.ietf.org/doc/html/rfc2392#section-2 Fixes: 61cfc740dd3b7b93f81bf8917312eb6c39359c81 Author-Change-Id: IB#1114877

Checklist