Merge branch '2023.03-rc' into stable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
@@ -49,7 +49,13 @@ class UpdateGServer
|
||||
|
||||
$filtered = filter_var($server_url, FILTER_SANITIZE_URL);
|
||||
if (substr(Strings::normaliseLink($filtered), 0, 7) != 'http://') {
|
||||
GServer::setFailure($server_url);
|
||||
GServer::setFailureByUrl($server_url);
|
||||
return;
|
||||
}
|
||||
|
||||
// Silently dropping the worker task if the server domain is blocked
|
||||
if (Network::isUrlBlocked($filtered)) {
|
||||
GServer::setBlockedByUrl($filtered);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,13 +65,13 @@ class UpdateGServer
|
||||
}
|
||||
|
||||
if (($filtered != $server_url) && DBA::exists('gserver', ['nurl' => Strings::normaliseLink($server_url)])) {
|
||||
GServer::setFailure($server_url);
|
||||
GServer::setFailureByUrl($server_url);
|
||||
return;
|
||||
}
|
||||
|
||||
$cleaned = GServer::cleanURL($server_url);
|
||||
if (($cleaned != $server_url) && DBA::exists('gserver', ['nurl' => Strings::normaliseLink($server_url)])) {
|
||||
GServer::setFailure($server_url);
|
||||
GServer::setFailureByUrl($server_url);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -84,6 +90,7 @@ class UpdateGServer
|
||||
{
|
||||
// Dropping the worker task if the server domain is blocked
|
||||
if (Network::isUrlBlocked($serverUrl)) {
|
||||
GServer::setBlockedByUrl($serverUrl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user