Issue 8663: Prevent abusive behaviour when probing servers

This commit is contained in:
Michael 2020-05-20 06:57:46 +00:00
parent aadaf032ee
commit a77c0194dc
2 changed files with 46 additions and 15 deletions

View file

@ -29,9 +29,10 @@ class UpdateGServer
{
/**
* Update the given server
* @param string $server_url Server URL
* @param string $server_url Server URL
* @param boolean $only_nodeinfo Only use nodeinfo for server detection
*/
public static function execute($server_url)
public static function execute(string $server_url, bool $only_nodeinfo = false)
{
if (empty($server_url)) {
return;
@ -42,7 +43,7 @@ class UpdateGServer
return;
}
$ret = GServer::check($server_url);
$ret = GServer::check($server_url, '', false, $only_nodeinfo);
Logger::info('Updated gserver', ['url' => $server_url, 'result' => $ret]);
}
}