deprecate ld-signatures on actor records

This commit is contained in:
Mike Macgirvin 2023-12-30 07:49:56 +11:00
parent 3d4e8c9f98
commit 5c3efea888
3 changed files with 8 additions and 4 deletions

View file

@ -153,7 +153,7 @@ class Channel extends Controller
http_status_exit(403, 'Permission denied');
}
as_return_and_die(Activity::encode_person($channel, true, true), $channel);
as_return_and_die(Activity::encode_person($channel, true, true), $channel, '',false);
}
// handle zot6 channel discovery

View file

@ -1,9 +1,11 @@
An open source fediverse server with a long history of innovation. See [FEATURES](https://codeberg.org/streams/streams/src/branch/dev/FEATURES.md).
This software is dedicated to the public domain to the extent permissible by law and is not associated with any consumer brand or product.
The software supports a wide range of online behaviour, from personal communications with closed media access - all the way to fully public broadcasting. The default settings tend to favor personal and private use. Adjust as desired.
This repository uses a community-driven model. This means that there are no dedicated developers working on new features or bug fixes or translations or documentation. Instead, it relies on the contributed efforts of those that choose to use it.
This software is dedicated to the public domain to the extent permissible by law and is not associated with any consumer brand or product.
A fediverse support group exists at
https://fediversity.site/channel/streams

View file

@ -40,7 +40,7 @@ function json_return_and_die($x, $content_type = 'application/json', $debug = fa
killme();
}
function as_return_and_die($obj, $channel, $contextType = null)
function as_return_and_die($obj, $channel, $contextType = null, $ldsign = true)
{
if (! is_array($obj)) {
@ -52,7 +52,9 @@ function as_return_and_die($obj, $channel, $contextType = null)
$headers = [];
$headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ;
$data['signature'] = LDSignatures::sign($data, $channel);
if ($ldsign) {
$data['signature'] = LDSignatures::sign($data, $channel);
}
$json = json_encode($data, JSON_UNESCAPED_SLASHES);
logger('data: ' . jindent($json), LOGGER_DATA);
$headers['Date'] = datetime_convert('UTC', 'UTC', 'now', 'D, d M Y H:i:s \\G\\M\\T');