From 9f90806027568666d6cd60eb41ec66d278fe05cd Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 29 Nov 2015 15:23:29 -0800 Subject: log whatever is showing up in the delivery hash array since it seems that one site has something unusual there and it is throwing errors. --- include/zot.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index c0d537eb9..e575f3d05 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1246,6 +1246,10 @@ function zot_import($arr, $sender_url) { $no_dups = array(); if($deliveries) { foreach($deliveries as $d) { + if(! is_array($d)) { + logger('Delivery hash array is not an array: ' . print_r($d,true)); + continue; + } if(! in_array($d['hash'],$no_dups)) $no_dups[] = $d['hash']; } -- cgit v1.2.3 From 650f882265cc0256fa85046baacca9dc6db56d24 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 29 Nov 2015 20:26:00 -0800 Subject: generalise the site black|white allow lists, also add a channel black|white list for future use --- include/zot.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index e575f3d05..6764072aa 100644 --- a/include/zot.php +++ b/include/zot.php @@ -554,18 +554,8 @@ function zot_gethub($arr,$multiple = false) { if($arr['guid'] && $arr['guid_sig'] && $arr['url'] && $arr['url_sig']) { - $blacklisted = false; - $bl1 = get_config('system','blacklisted_sites'); - if(is_array($bl1) && $bl1) { - foreach($bl1 as $bl) { - if($bl && strpos($arr['url'],$bl) !== false) { - $blacklisted = true; - break; - } - } - } - if($blacklisted) { - logger('zot_gethub: blacklisted site: ' . $arr['url']); + if(! check_siteallowed($arr['url'])) { + logger('blacklisted site: ' . $arr['url']); return null; } -- cgit v1.2.3