See T13065 and rP1e2bc7775bc4.
Intended to cover the gap left by D25899.
The actual amount of impacted installations should
be 0, but the migration makes sure all pastes have
a mail key regardless.
Differential D25900
Remove the onboard "mailKey" from Paste mainframe98 on Feb 27 2025, 19:16. Authored by Tags None Referenced Files
Details
See T13065 and rP1e2bc7775bc4. Intended to cover the gap left by D25899.
Diff Detail
Event TimelineComment Actions You know better than me the context. Is there a possibility that an installation is already without that column? If you think yes, maybe DROP COLUMN IF EXISTS
Comment Actions Theoretically, yes, but in practice no, provided they ran storage upgrade. After a certain point, the deprecations in newer PHP versions would prevent you from running the migrations anyway. Afterwards, the paste table would have been renamed, breaking the upgrade entirely. (Also I forgot to drop the column from PhabricatorPaste - whoops)
Comment Actions What is (or rather was, I guess) that mailKey thingie good for? Or more relevant, I assume it's intentional after performing the Test Plan steps above that creating a new Paste does not create a new row in phabricator_metamta.metamta_mailproperties? Comment Actions According to https://secure.phabricator.com/T13065: This key is used as a seed to generate unique addresses for each <object, user> pair so that I send mail to T123+1+abe2h3f2 and you send mail to T123+2+fo1m213n and I can't just fiddle with my "+1" and impersonate someone else.
I had to go dig for this, but from what I understand of looking at PhabricatorMetaMTAMailProperties, which is the class now responsible for this functionality, creating a mail key only happens when its loadMailKey method is called. That method is only called when email functionality engaged. That does make testing slightly more difficult. The updated test plan (thanks, by the way!) is a good compromise. Comment Actions Ah, thanks. That explains why phabricator_metamta.metamta_mailproperties had been empty for me locally. |