mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
Check for explicit types
This commit is contained in:
parent
2b40e49e6e
commit
5772c70216
2 changed files with 3 additions and 3 deletions
|
@ -323,7 +323,7 @@ class ClientToServer
|
||||||
$requester_id = Contact::getIdForURL($requester, $owner['uid']);
|
$requester_id = Contact::getIdForURL($requester, $owner['uid']);
|
||||||
if (!empty($requester_id)) {
|
if (!empty($requester_id)) {
|
||||||
$permissionSets = DI::permissionSet()->selectByContactId($requester_id, $owner['uid']);
|
$permissionSets = DI::permissionSet()->selectByContactId($requester_id, $owner['uid']);
|
||||||
if (count($permissionSets)) {
|
if (count($permissionSets) > 0) {
|
||||||
$condition = ['psid' => array_merge($permissionSets->column('id'),
|
$condition = ['psid' => array_merge($permissionSets->column('id'),
|
||||||
[DI::permissionSet()->selectPublicForUser($owner['uid'])])];
|
[DI::permissionSet()->selectPublicForUser($owner['uid'])])];
|
||||||
}
|
}
|
||||||
|
|
|
@ -619,7 +619,7 @@ class Receiver
|
||||||
}
|
}
|
||||||
|
|
||||||
$actor = JsonLD::fetchElement($activity, 'as:actor', '@id');
|
$actor = JsonLD::fetchElement($activity, 'as:actor', '@id');
|
||||||
if (empty($actor)) {
|
if ($actor === null || $actor === '') {
|
||||||
Logger::info('Empty actor', ['activity' => $activity]);
|
Logger::info('Empty actor', ['activity' => $activity]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -642,7 +642,7 @@ class Receiver
|
||||||
|
|
||||||
// Test the provided signatures against the actor and "attributedTo"
|
// Test the provided signatures against the actor and "attributedTo"
|
||||||
if ($trust_source) {
|
if ($trust_source) {
|
||||||
if (!empty($attributed_to) && $actor !== null) {
|
if ($attributed_to !== false && $attributed_to !== '') {
|
||||||
$trust_source = (in_array($actor, $signer) && in_array($attributed_to, $signer));
|
$trust_source = (in_array($actor, $signer) && in_array($attributed_to, $signer));
|
||||||
} else {
|
} else {
|
||||||
$trust_source = in_array($actor, $signer);
|
$trust_source = in_array($actor, $signer);
|
||||||
|
|
Loading…
Reference in a new issue