Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/receiver/PhabricatorObjectMailReceiver.php
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | private function loadObjectFromMail( | ||||
$parts = $this->matchObjectAddressInMail($mail); | $parts = $this->matchObjectAddressInMail($mail); | ||||
return $this->loadObject( | return $this->loadObject( | ||||
phutil_utf8_strtoupper($parts['pattern']), | phutil_utf8_strtoupper($parts['pattern']), | ||||
$sender); | $sender); | ||||
} | } | ||||
public static function computeMailHash($mail_key, $phid) { | public static function computeMailHash($mail_key, $phid) { | ||||
$global_mail_key = PhabricatorEnv::getEnvConfig('phabricator.mail-key'); | $hash = PhabricatorHash::digestWithNamedKey( | ||||
$mail_key.$phid, | |||||
$hash = PhabricatorHash::weakDigest($mail_key.$global_mail_key.$phid); | 'mail.object-address-key'); | ||||
return substr($hash, 0, 16); | return substr($hash, 0, 16); | ||||
} | } | ||||
} | } |