From 28cd2759d76c9227c474c8c1da073a4f91cf5523 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 1 Nov 2017 17:50:57 -0700 Subject: do not send message_list responses to dead sites (this delivery method bypassed the notifier) --- include/zot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/zot.php b/include/zot.php index 5270ed8b8..6647daa0a 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3872,7 +3872,7 @@ function zot_reply_message_request($data) { if ($messages) { $env_recips = null; - $r = q("select hubloc.*, site.site_crypto from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s' and hubloc_error = 0 and hubloc_deleted = 0", + $r = q("select hubloc.*, site.site_crypto from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s' and hubloc_error = 0 and hubloc_deleted = 0 and site.site_dead = 0 ", dbesc($sender_hash) ); if (! $r) { -- cgit v1.2.3 From 52657b6215b3b7104a89c8c3fea09a7f37ebf71e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 1 Nov 2017 19:24:29 -0700 Subject: don't perform zot_refresh on dead sites unless $force is set --- include/zot.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/zot.php b/include/zot.php index 6647daa0a..bb87a234c 100644 --- a/include/zot.php +++ b/include/zot.php @@ -285,6 +285,16 @@ function zot_refresh($them, $channel = null, $force = false) { return false; } + $s = q("select site_dead from site where site_url = '%s' limit 1", + dbesc($url) + ); + + if($s && intval($s[0]['site_dead']) && (! $force)) { + logger('zot_refresh: site ' . $url . ' is marked dead and force flag is not set. Cancelling operation.'); + return false; + } + + $token = random_string(); $postvars = []; -- cgit v1.2.3