mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update helpers
This commit is contained in:
parent
8c2fa76c7d
commit
e2b782466d
1 changed files with 12 additions and 0 deletions
|
@ -210,6 +210,18 @@ class Helpers {
|
||||||
$activity = ['object' => $res];
|
$activity = ['object' => $res];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$idDomain = parse_url($activity['id'], PHP_URL_HOST);
|
||||||
|
$urlDomain = parse_url($url, PHP_URL_HOST);
|
||||||
|
$actorDomain = parse_url($activity['object']['attributedTo'], PHP_URL_HOST);
|
||||||
|
|
||||||
|
if(
|
||||||
|
$idDomain !== $urlDomain ||
|
||||||
|
$actorDomain !== $urlDomain ||
|
||||||
|
$idDomain !== $actorDomain
|
||||||
|
) {
|
||||||
|
abort(400, 'Invalid object');
|
||||||
|
}
|
||||||
|
|
||||||
$profile = self::profileFirstOrNew($activity['object']['attributedTo']);
|
$profile = self::profileFirstOrNew($activity['object']['attributedTo']);
|
||||||
if(isset($activity['object']['inReplyTo']) && !empty($activity['object']['inReplyTo']) && $replyTo == true) {
|
if(isset($activity['object']['inReplyTo']) && !empty($activity['object']['inReplyTo']) && $replyTo == true) {
|
||||||
$reply_to = self::statusFirstOrFetch($activity['object']['inReplyTo'], false);
|
$reply_to = self::statusFirstOrFetch($activity['object']['inReplyTo'], false);
|
||||||
|
|
Loading…
Reference in a new issue