Merge pull request #6834 from MrPetovan/bug/6819-prevent-blocked-server-relay
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 9 Mar 2019 08:10:28 +0000 (09:10 +0100)
committerGitHub <noreply@github.com>
Sat, 9 Mar 2019 08:10:28 +0000 (09:10 +0100)
Prevent accepting relayed posts from blocked servers

src/Protocol/Diaspora.php
src/Util/Network.php

index ca66aa0..12f4115 100644 (file)
@@ -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?
index cda8c9a..3574464 100644 (file)
@@ -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)
        {