aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Joe Stump <joe@stu.mp> 2023-11-10 23:40:51 -0800
committerGravatar GitHub <noreply@github.com> 2023-11-11 08:40:51 +0100
commit641b89197243c67f90e8853ad2187c831050fbe7 (patch)
tree1c3dbde06dd3450ce2b7f9fd10cc3d4f906247d7 /lib/lib_rss.php
parent0fb339f0f1465ce9d1d6d3f6c9ae4e46a395ba0d (diff)
Fix trusted cidrs check (#5853)
* Fix ignored TRUSTED_PROXY issue * Add a sub-section to the docs no property mappings for Authentik * Typo * Fix typing * A few changes to the doc --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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;
}