aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 356d5bc0d..648f11a74 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -683,10 +683,10 @@ function checkTrustedIP(): bool {
if ($trusted != 0 && is_string($trusted)) {
$trusted = preg_split('/\s+/', $trusted, -1, PREG_SPLIT_NO_EMPTY);
}
- if (empty($trusted)) {
+ if (!is_array($trusted) || empty($trusted)) {
$trusted = FreshRSS_Context::$system_conf->trusted_sources;
}
- foreach (FreshRSS_Context::$system_conf->trusted_sources as $cidr) {
+ foreach ($trusted as $cidr) {
if (checkCIDR($remoteIp, $cidr)) {
return true;
}