1
0
Fork 0

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
1 changed files with 4 additions and 0 deletions

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').')'