Update ActivityPubFetchService, add url validation

This commit is contained in:
Daniel Supernault 2021-01-25 21:44:07 -07:00
parent ea8e426174
commit 654b08d382
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -11,6 +11,10 @@ class ActivityPubFetchService
{
public static function get($url)
{
if(!Helpers::validateUrl($url)) {
return 0;
}
$headers = HttpSignature::instanceActorSign($url, false, [
'Accept' => 'application/activity+json, application/json',
'User-Agent' => '(Pixelfed/'.config('pixelfed.version').'; +'.config('app.url').')'