Add test for public host in profile poll queue add
This commit is contained in:
parent
5207196e1a
commit
93e0153112
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Friendica\Directory\Models;
|
||||
|
||||
use Friendica\Directory\Utils\Network;
|
||||
|
||||
/**
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
*/
|
||||
|
@ -15,6 +17,15 @@ class ProfilePollQueue extends \Friendica\Directory\Model
|
|||
return false;
|
||||
}
|
||||
|
||||
$host = parse_url($url, PHP_URL_HOST);
|
||||
if (!$host) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Network::isPublicHost($host)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->atlas->perform(
|
||||
'INSERT IGNORE INTO `profile_poll_queue` SET `profile_url` = :profile_url',
|
||||
['profile_url' => $url]
|
||||
|
|
Loading…
Reference in a new issue