TB-throwback / LookOut-fix-version

Fork of LookOut (fix version)
51 stars 17 forks source link

Strict Content Type Matching should be disabled #87

Closed MatejKovacic closed 2 years ago

MatejKovacic commented 2 years ago

Context

Expected Behavior

Should show PDF file instead of winmail.dat.

Current Behavior

Shows only winmail.dat.

Steps to Reproduce

  1. click to e-mail
  2. only winmail.dat attachment is shown

Failure Information (for bugs)

Failure Logs ``` LookOut: debug enabled LookOut: Entering on_end_all_attachments() LookOut: Entering scan_for_tnef() LookOut: debug enabled LookOut: Entering on_end_all_attachments() LookOut: Entering scan_for_tnef() ({message:({}), contentType:"", name:"winmail.dat", url:"imap://***@***:993/fetch%3EUID%3E/INBOX%3E220353?part=1.2&filename=winmail.dat", uri:"imap-message://***@***/INBOX#220353", isExternalAttachment:false, size:898347, sizeResolved:true, partID:"1.2"}) LookOut: Content Type: '' LookOut: Strict Content check failed ```

Solution

I found out that Strict Content Type Matching should be disabled. Would the solution be to have this disabled by default? Sorry to ask, but what is this setting anyway?

dugite-code commented 2 years ago

Strict Content Type Matching comes from Lookout's history of being a XUL plugin. Prior to the MailExtension migrations it was very probable for a plugin locking or even completely crashing the mail client. To avoid issues Lookout originaly only ever checked attachments correctly identified via the application\ms-tnef filetype. I added the ability to disable this behavior as when forwarded these attachments could loose this filetype identification, this lets Lookout open check each and every attachment in an email to see if it's a tnef file. As you can guess this is quite inefficient.

Lookout is still a legacy add-on and is not asynchronous, even though it's loaded via the Experiment wrapper API it's probably not something that should be changed at this time.

I had hoped the TNEF integration would be added directly into Thunderbird, but it looks like it has been removed from the roadmap. This is possibly as jobisoft, Thunderbirds Add-on support engineer, is currently updating the add-on