Page MenuHomePhabricator

Use object PHIDs for "Thread-Topic" headers in mail
ClosedPublic

Authored by epriestley on Feb 7 2018, 11:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 4:48 AM
Unknown Object (File)
Mon, Dec 9, 5:11 PM
Unknown Object (File)
Mon, Dec 9, 3:18 PM
Unknown Object (File)
Sat, Dec 7, 1:55 PM
Unknown Object (File)
Fri, Dec 6, 5:08 PM
Unknown Object (File)
Fri, Dec 6, 6:53 AM
Unknown Object (File)
Mon, Dec 2, 11:04 AM
Unknown Object (File)
Nov 4 2024, 1:54 AM
Subscribers
None

Details

Summary

Depends on D19009. Ref T13053. For "Must Encrypt" mail, we must currently strip the "Thread-Topic" header because it sometimes contains sensitive information about the object.

I don't actually know if this header is useful or anyting uses it. My understanding is that it's an Outlook/Exchange thing, but we also implement "Thread-Index" which I think is what Outlook/Exchange actually look at. This header may have done something before we implemented "Thread-Index", or maybe never done anything. Or maybe older versions of Excel/Outlook did something with it and newer versions don't, or do less. So it's possible that an even better fix here would be to simply remove this, but I wasn't able to convince myself of that after Googling for 10 minutes and I don't think it's worth hours of installing Exchange/Outlook to figure out. Instead, I'm just trying to simplify our handling of this header for now, and maybe some day we'll learn more about Exchange/Outlook and can remove it.

In a number of cases we already use the object monogram or PHID as a "Thread-Topic" without users ever complaining, so I think that if this header is useful it probably isn't shown to users, or isn't shown very often (e.g., only in a specific "conversation" sub-view?). Just use the object PHID (which should be unique and stable) as a thread-topic, everywhere, automatically.

Then allow this header through for "Must Encrypt" mail.

Test Plan

Processed some local mail, saw object PHIDs for "Thread-Topic" headers.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The "retain the original title" scheme comes from D2745 in 2012, which suggests that this is shown in some clients but doesn't really have any details.

Even if we learn that this is shown in a nontrivial number of clients after shipping it, I'd be inclined to keep most of this change anyway, and use "Differential Revision D123" or similar as a Thread-Topic so that we can keep "Must Encrypt" mail threaded correctly.

If that still somehow produces really bad behavior for some users and doing a "keep the original, human-readable topic" sort of thing really is our only option, I'd still want to keep most of this change and write an "<objectPHID, originalTitle>" cache somewhere in MetaMTA (with the title the object had the first time we sent mail about it) so that we don't have to put originalTitle fields on every object to get good behavior.

I also made a similar but narrower change in D17798 (going from human-readable to PHID), about a year ago, without complaint.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 8 2018, 2:21 PM
This revision was automatically updated to reflect the committed changes.
epriestley mentioned this in Unknown Object (Phriction Wiki Document).Feb 10 2018, 1:02 AM