Update AP Helper

This commit is contained in:
Daniel Supernault 2020-04-29 13:47:03 -06:00
parent 155e960f54
commit 28cbadf197
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -285,10 +285,10 @@ class Helpers {
}
}
if(!self::validateUrl($res['id']) ||
if(!self::validateUrl($activity['object']['id']) ||
!self::validateUrl($activity['object']['attributedTo'])
) {
abort(400, 'Invalid object url');
return;
}
$idDomain = parse_url($res['id'], PHP_URL_HOST);
@ -300,7 +300,7 @@ class Helpers {
$actorDomain !== $urlDomain ||
$idDomain !== $actorDomain
) {
abort(400, 'Invalid object');
return;
}
$profile = self::profileFirstOrNew($activity['object']['attributedTo']);