Merge pull request #2156 from pixelfed/staging

Update Inbox
This commit is contained in:
daniel 2020-04-29 15:57:10 -06:00 committed by GitHub
commit 3c6b4ef0e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -300,6 +300,9 @@ class Inbox
} }
$actor = $this->payload['actor']; $actor = $this->payload['actor'];
$obj = $this->payload['object']; $obj = $this->payload['object'];
if(is_string($obj) == true) {
return;
}
$type = $this->payload['object']['type']; $type = $this->payload['object']['type'];
$typeCheck = in_array($type, ['Person', 'Tombstone']); $typeCheck = in_array($type, ['Person', 'Tombstone']);
if(!Helpers::validateUrl($actor) || !Helpers::validateUrl($obj['id']) || !$typeCheck) { if(!Helpers::validateUrl($actor) || !Helpers::validateUrl($obj['id']) || !$typeCheck) {