Merge pull request #6834 from MrPetovan/bug/6819-prevent-blocked-server-relay

Prevent accepting relayed posts from blocked servers
This commit is contained in:
Tobias Diekershoff 2019-03-09 09:10:28 +01:00 committed by GitHub
commit c4bfc6e86e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View 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?

View 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)
{