1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Feed - permenantly fail publish workers if the uri they are posting to is not in configu

Summary: Fixes T5958

Test Plan: i just used the ole logic noodle on this one

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5958

Differential Revision: https://secure.phabricator.com/D10359
This commit is contained in:
Bob Trahan 2014-08-26 15:05:54 -07:00
parent 69b0ac724a
commit 7cdee1884e

View file

@ -7,6 +7,10 @@ final class FeedPublisherHTTPWorker extends FeedPushWorker {
$data = $story->getStoryData();
$uri = idx($this->getTaskData(), 'uri');
$valid_uris = PhabricatorEnv::getEnvConfig('feed.http-hooks');
if (!in_array($uri, $valid_uris)) {
throw new PhabricatorWorkerPermanentFailureException();
}
$post_data = array(
'storyID' => $data->getID(),