From d40cbdce32eb7fe427eb0f43969877577e74730c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 8 Mar 2019 22:39:08 -0500 Subject: [PATCH 1/2] Remove unnecessary @throws tag in Util\Network --- src/Util/Network.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Util/Network.php b/src/Util/Network.php index cda8c9a71d..35744647e3 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -459,7 +459,6 @@ class Network * @param string $url The url to check the domain from * * @return boolean - * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public static function isUrlBlocked($url) { From 704cb052caeff28ae04ceb5f20ff80959ae59429 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 8 Mar 2019 22:40:08 -0500 Subject: [PATCH 2/2] Add server block provision to Diaspora::postAllow --- src/Protocol/Diaspora.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index ca66aa0a67..12f4115384 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1135,8 +1135,11 @@ class Diaspora // Logger::log("defining user ".$contact["nick"]." as friend"); //} - // We don't seem to like that person - if ($contact["blocked"]) { + // Contact server is blocked + if (Network::isUrlBlocked($contact['url'])) { + return false; + // We don't seem to like that person + } elseif ($contact["blocked"]) { // Maybe blocked, don't accept. return false; // We are following this person?