Merge pull request #6834 from MrPetovan/bug/6819-prevent-blocked-server-relay
Prevent accepting relayed posts from blocked servers
This commit is contained in:
commit
c4bfc6e86e
|
@ -1135,8 +1135,11 @@ class Diaspora
|
||||||
// Logger::log("defining user ".$contact["nick"]." as friend");
|
// Logger::log("defining user ".$contact["nick"]." as friend");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
// Contact server is blocked
|
||||||
|
if (Network::isUrlBlocked($contact['url'])) {
|
||||||
|
return false;
|
||||||
// We don't seem to like that person
|
// We don't seem to like that person
|
||||||
if ($contact["blocked"]) {
|
} elseif ($contact["blocked"]) {
|
||||||
// Maybe blocked, don't accept.
|
// Maybe blocked, don't accept.
|
||||||
return false;
|
return false;
|
||||||
// We are following this person?
|
// We are following this person?
|
||||||
|
|
|
@ -459,7 +459,6 @@ class Network
|
||||||
* @param string $url The url to check the domain from
|
* @param string $url The url to check the domain from
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
|
||||||
*/
|
*/
|
||||||
public static function isUrlBlocked($url)
|
public static function isUrlBlocked($url)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user