mirror of
https://github.com/friendica/friendica
synced 2025-04-21 10:30:13 +00:00
Improvements to signature check, private posts do work now again
This commit is contained in:
parent
4c224fbddd
commit
b44fc62708
5 changed files with 166 additions and 97 deletions
|
@ -25,14 +25,14 @@ class Inbox extends BaseModule
|
|||
System::httpExit(400);
|
||||
}
|
||||
|
||||
if (HTTPSignature::verifyAP($postdata, $_SERVER)) {
|
||||
if (HTTPSignature::getSigner($postdata, $_SERVER)) {
|
||||
$filename = 'signed-activitypub';
|
||||
} else {
|
||||
$filename = 'failed-activitypub';
|
||||
}
|
||||
|
||||
$tempfile = tempnam(get_temppath(), $filename);
|
||||
file_put_contents($tempfile, json_encode(['argv' => $a->argv, 'header' => $_SERVER, 'body' => $postdata]));
|
||||
file_put_contents($tempfile, json_encode(['argv' => $a->argv, 'header' => $_SERVER, 'body' => $postdata], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
|
||||
|
||||
logger('Incoming message stored under ' . $tempfile);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue