From b594ad2de347326739f3b9ff4eaf68580903c41d Mon Sep 17 00:00:00 2001 From: Dag Date: Fri, 7 Jul 2023 11:25:36 +0200 Subject: [PATCH] fix: discard empty lines in whitelist.txt (#3507) --- lib/Configuration.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Configuration.php b/lib/Configuration.php index ddaaa051..b6b2e4d6 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -109,11 +109,11 @@ final class Configuration } if (file_exists(__DIR__ . '/../whitelist.txt')) { - $whitelist = trim(file_get_contents(__DIR__ . '/../whitelist.txt')); - if ($whitelist === '*') { + $enabledBridges = trim(file_get_contents(__DIR__ . '/../whitelist.txt')); + if ($enabledBridges === '*') { self::setConfig('system', 'enabled_bridges', ['*']); } else { - self::setConfig('system', 'enabled_bridges', explode("\n", $whitelist)); + self::setConfig('system', 'enabled_bridges', array_filter(explode("\n", $enabledBridges))); } }