1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Accept case-insensitive mail replies

Summary:
Mailbox sometimes (?) changes the case of the email address (?). Be more liberal in what we accept.

Also fix a minor output bug.

Test Plan: Sent mail to `e1+...` instead of `E1+...`, verified it arrived.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7575
This commit is contained in:
epriestley 2013-11-12 21:23:23 -08:00
parent 435134f7eb
commit a3c811f281
2 changed files with 7 additions and 2 deletions

View file

@ -63,6 +63,9 @@ final class PhabricatorMailManagementShowInboundWorkflow
$info[] = null; $info[] = null;
$info[] = pht('HEADERS'); $info[] = pht('HEADERS');
foreach ($message->getHeaders() as $key => $value) { foreach ($message->getHeaders() as $key => $value) {
if (is_array($value)) {
$value = implode("\n", $value);
}
$info[] = pht('%s: %s', $key, $value); $info[] = pht('%s: %s', $key, $value);
} }

View file

@ -156,7 +156,7 @@ abstract class PhabricatorObjectMailReceiver extends PhabricatorMailReceiver {
'(?P<sender>\w+)'. '(?P<sender>\w+)'.
'\\+'. '\\+'.
'(?P<hash>[a-f0-9]{16})'. '(?P<hash>[a-f0-9]{16})'.
'$)U'; '$)Ui';
return $regexp; return $regexp;
} }
@ -166,7 +166,9 @@ abstract class PhabricatorObjectMailReceiver extends PhabricatorMailReceiver {
PhabricatorUser $sender) { PhabricatorUser $sender) {
$parts = $this->matchObjectAddressInMail($mail); $parts = $this->matchObjectAddressInMail($mail);
return $this->loadObject($parts['pattern'], $sender); return $this->loadObject(
phutil_utf8_strtoupper($parts['pattern']),
$sender);
} }
public static function computeMailHash($mail_key, $phid) { public static function computeMailHash($mail_key, $phid) {