Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | try { | ||||
foreach ($targets as $key => $target) { | foreach ($targets as $key => $target) { | ||||
// Never accept any reserved address as a mail target. This prevents | // Never accept any reserved address as a mail target. This prevents | ||||
// security issues around "hostmaster@" and bad behavior with | // security issues around "hostmaster@" and bad behavior with | ||||
// "noreply@". | // "noreply@". | ||||
if (PhabricatorMailUtil::isReservedAddress($target)) { | if (PhabricatorMailUtil::isReservedAddress($target)) { | ||||
unset($targets[$key]); | unset($targets[$key]); | ||||
continue; | continue; | ||||
} | } | ||||
// See T13234. Don't process mail if a user has attached this address | |||||
// to their account. | |||||
if (PhabricatorMailUtil::isUserAddress($target)) { | |||||
unset($targets[$key]); | |||||
continue; | |||||
} | |||||
} | } | ||||
$any_accepted = false; | $any_accepted = false; | ||||
$receiver_exception = null; | $receiver_exception = null; | ||||
foreach ($receivers as $receiver) { | foreach ($receivers as $receiver) { | ||||
$receiver = id(clone $receiver) | $receiver = id(clone $receiver) | ||||
->setViewer($viewer); | ->setViewer($viewer); | ||||
▲ Show 20 Lines • Show All 360 Lines • Show Last 20 Lines |