Differential D13200 Diff 31965 src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/controller/PhabricatorMetaMTAMailgunReceiveController.php
| Show All 17 Lines | final class PhabricatorMetaMTAMailgunReceiveController | ||||
| } | } | ||||
| public function processRequest() { | public function processRequest() { | ||||
| // No CSRF for Mailgun. | // No CSRF for Mailgun. | ||||
| $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | ||||
| if (!$this->verifyMessage()) { | if (!$this->verifyMessage()) { | ||||
| throw new Exception( | throw new Exception( | ||||
| 'Mail signature is not valid. Check your Mailgun API key.'); | pht('Mail signature is not valid. Check your Mailgun API key.')); | ||||
| } | } | ||||
| $request = $this->getRequest(); | $request = $this->getRequest(); | ||||
| $user = $request->getUser(); | $user = $request->getUser(); | ||||
| $raw_headers = $request->getStr('headers'); | $raw_headers = $request->getStr('headers'); | ||||
| $raw_headers = explode("\n", rtrim($raw_headers)); | $raw_headers = explode("\n", rtrim($raw_headers)); | ||||
| $raw_dict = array(); | $raw_dict = array(); | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||