diff --git a/src/applications/metamta/controller/sendgridreceive/PhabricatorMetaMTASendGridReceiveController.php b/src/applications/metamta/controller/sendgridreceive/PhabricatorMetaMTASendGridReceiveController.php index be18f7c2d9..b9dd21b1ed 100644 --- a/src/applications/metamta/controller/sendgridreceive/PhabricatorMetaMTASendGridReceiveController.php +++ b/src/applications/metamta/controller/sendgridreceive/PhabricatorMetaMTASendGridReceiveController.php @@ -25,6 +25,9 @@ class PhabricatorMetaMTASendGridReceiveController public function processRequest() { + // No CSRF for SendGrid. + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $request = $this->getRequest(); $user = $request->getUser(); diff --git a/src/applications/repository/controller/github-post-receive/PhabricatorRepositoryGitHubPostReceiveController.php b/src/applications/repository/controller/github-post-receive/PhabricatorRepositoryGitHubPostReceiveController.php index 498ee64382..d75dda55cf 100644 --- a/src/applications/repository/controller/github-post-receive/PhabricatorRepositoryGitHubPostReceiveController.php +++ b/src/applications/repository/controller/github-post-receive/PhabricatorRepositoryGitHubPostReceiveController.php @@ -56,6 +56,9 @@ class PhabricatorRepositoryGitHubPostReceiveController "won't do anything!"); } + // GitHub POSTs here and doesn't do CSRF. + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $notification = new PhabricatorRepositoryGitHubNotification(); $notification->setRepositoryPHID($repo->getPHID()); $notification->setRemoteAddress($_SERVER['REMOTE_ADDR']);