diff --git a/lib/BridgeFactory.php b/lib/BridgeFactory.php index fea254f1cb3..57f3333b216 100644 --- a/lib/BridgeFactory.php +++ b/lib/BridgeFactory.php @@ -148,7 +148,9 @@ public function getWhitelist() { if($firstCall) { - if(file_exists(WHITELIST)) { + if(getenv('RSSBRIDGE_WHITELIST')) { + $contents = str_replace(',', '\n', getenv('RSSBRIDGE_WHITELIST')); + } elseif(file_exists(WHITELIST)) { $contents = trim(file_get_contents(WHITELIST)); } elseif(file_exists(WHITELIST_DEFAULT)) { $contents = trim(file_get_contents(WHITELIST_DEFAULT)); @@ -159,7 +161,6 @@ public function getWhitelist() { if($contents === '*') { // Whitelist all bridges $this->whitelist = $this->getBridgeNames(); } else { - //$this->$whitelist = array_map('$this->sanitizeBridgeName', explode("\n", $contents)); foreach(explode("\n", $contents) as $bridgeName) { $this->whitelist[] = $this->sanitizeBridgeName($bridgeName); }