Update Helpers

This commit is contained in:
Daniel Supernault 2019-06-15 23:30:12 -06:00
parent bdfe633f28
commit e3c11f76ae
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -284,6 +284,12 @@ class Helpers {
} }
} }
if(!self::validateUrl($res['id']) ||
!self::validateUrl($activity['object']['attributedTo'])
) {
abort(400, 'Invalid object url');
}
$idDomain = parse_url($res['id'], PHP_URL_HOST); $idDomain = parse_url($res['id'], PHP_URL_HOST);
$urlDomain = parse_url($url, PHP_URL_HOST); $urlDomain = parse_url($url, PHP_URL_HOST);
$actorDomain = parse_url($activity['object']['attributedTo'], PHP_URL_HOST); $actorDomain = parse_url($activity['object']['attributedTo'], PHP_URL_HOST);