Removed unneeded check
This commit is contained in:
parent
f0563df991
commit
60c7bc90e6
1 changed files with 2 additions and 9 deletions
|
@ -29,7 +29,6 @@ use Friendica\Model\Contact;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
use Friendica\Util\HTTPSignature;
|
use Friendica\Util\HTTPSignature;
|
||||||
use Friendica\Util\JsonLD;
|
use Friendica\Util\JsonLD;
|
||||||
use Friendica\Util\Network;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ActivityPub Protocol class
|
* ActivityPub Protocol class
|
||||||
|
@ -287,13 +286,13 @@ class ActivityPub
|
||||||
|
|
||||||
$signer = HTTPSignature::getSigner('', $_SERVER);
|
$signer = HTTPSignature::getSigner('', $_SERVER);
|
||||||
if (!$signer) {
|
if (!$signer) {
|
||||||
Logger::debug('No signer', ['uid' => $uid, 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'called_by' => $called_by]);
|
Logger::debug('No signer or invalid signature', ['uid' => $uid, 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'called_by' => $called_by]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$apcontact = APContact::getByURL($signer);
|
$apcontact = APContact::getByURL($signer);
|
||||||
if (empty($apcontact)) {
|
if (empty($apcontact)) {
|
||||||
Logger::debug('APContact not found', ['uid' => $uid, 'handle' => $signer, 'called_by' => $called_by]);
|
Logger::info('APContact not found', ['uid' => $uid, 'handle' => $signer, 'called_by' => $called_by]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,12 +301,6 @@ class ActivityPub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check added as a precaution. It should not occur.
|
|
||||||
if (Network::isUrlBlocked($apcontact['baseurl'])) {
|
|
||||||
Logger::info('Requesting domain is blocked', ['uid' => $uid, 'id' => $apcontact['gsid'], 'url' => $apcontact['baseurl'], 'signer' => $signer, 'called_by' => $called_by]);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$contact = Contact::getByURL($signer, false, ['id', 'baseurl', 'gsid']);
|
$contact = Contact::getByURL($signer, false, ['id', 'baseurl', 'gsid']);
|
||||||
if (!empty($contact) && Contact\User::isBlocked($contact['id'], $uid)) {
|
if (!empty($contact) && Contact\User::isBlocked($contact['id'], $uid)) {
|
||||||
Logger::info('Requesting contact is blocked', ['uid' => $uid, 'id' => $contact['id'], 'signer' => $signer, 'baseurl' => $contact['baseurl'], 'called_by' => $called_by]);
|
Logger::info('Requesting contact is blocked', ['uid' => $uid, 'id' => $contact['id'], 'signer' => $signer, 'baseurl' => $contact['baseurl'], 'called_by' => $called_by]);
|
||||||
|
|
Loading…
Reference in a new issue