]> git.mxchange.org Git - friendica.git/commitdiff
Don't deliver to blocked domains
authorMichael <heluecht@pirati.ca>
Thu, 22 Nov 2018 22:09:22 +0000 (22:09 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 22 Nov 2018 22:09:22 +0000 (22:09 +0000)
src/Worker/Delivery.php

index 3ae0be140dcdc15a1c68d48fd186e9f497e40b8f..0d56bfa5d1117bec4fab2a65beb39a0d972dabde 100644 (file)
@@ -19,6 +19,7 @@ use Friendica\Protocol\DFRN;
 use Friendica\Protocol\Diaspora;
 use Friendica\Protocol\Email;
 use Friendica\Util\Strings;
+use Friendica\Util\Network;
 
 require_once 'include/items.php';
 
@@ -158,6 +159,10 @@ class Delivery extends BaseObject
                        return;
                }
 
+               if (Network::isUrlBlocked($contact['url'])) {
+                       return;
+               }
+
                // Transmit via Diaspora if the thread had started as Diaspora post
                // This is done since the uri wouldn't match (Diaspora doesn't transmit it)
                if (isset($parent) && ($parent['network'] == Protocol::DIASPORA) && ($contact['network'] == Protocol::DFRN)) {