mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 20:04:32 +02:00
Issue 14879: Fix activity trust check
This commit is contained in:
parent
f32cb5c0dc
commit
a0326f3b40
1 changed files with 5 additions and 2 deletions
|
@ -644,16 +644,19 @@ class Receiver
|
|||
return true;
|
||||
}
|
||||
} else {
|
||||
$attributed_to = '';
|
||||
$attributed_to = null;
|
||||
}
|
||||
|
||||
// Test the provided signatures against the actor and "attributedTo"
|
||||
if ($trust_source) {
|
||||
if ($attributed_to !== false && $attributed_to !== '') {
|
||||
if (!is_null($attributed_to)) {
|
||||
$trust_source = (in_array($actor, $signer) && in_array($attributed_to, $signer));
|
||||
} else {
|
||||
$trust_source = in_array($actor, $signer);
|
||||
}
|
||||
if (!$trust_source) {
|
||||
DI::logger()->info('Actor missmatch. Activity trust could not be achieved.', ['type' => $type, 'signer' => $signer, 'actor' => $actor, 'attributedTo' => $attributed_to]);
|
||||
}
|
||||
}
|
||||
|
||||
// Lemmy announces activities.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue