mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01: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:
parent
69b0ac724a
commit
7cdee1884e
1 changed files with 4 additions and 0 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue