mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
Merge ../rebble.net into dev
This commit is contained in:
commit
f4779a8c66
4 changed files with 20 additions and 3 deletions
|
@ -2571,6 +2571,23 @@ class Channel
|
|||
return (($channel) ? z_root() . '/channel/' . $channel['channel_address'] : z_root());
|
||||
}
|
||||
|
||||
|
||||
public static function keyId($channel)
|
||||
{
|
||||
|
||||
// data validation - if this is wrong, log the call stack so we can find the issue
|
||||
|
||||
if (! is_array($channel)) {
|
||||
btlogger('not a channel array: ' . print_r($channel, true));
|
||||
}
|
||||
|
||||
if ($channel['channel_address'] === App::get_hostname() || intval($channel['channel_system'])) {
|
||||
return z_root() . '?operation=getkey';
|
||||
}
|
||||
|
||||
return (($channel) ? z_root() . '/channel/' . $channel['channel_address'] : z_root()) . '?operation=getkey';
|
||||
}
|
||||
|
||||
public static function is_group($uid)
|
||||
{
|
||||
$role = get_pconfig($uid, 'system', 'permissions_role');
|
||||
|
|
|
@ -384,7 +384,7 @@ class Queue
|
|||
$headers['Host'] = $m['host'];
|
||||
$headers['(request-target)'] = 'post ' . get_request_string($outq['outq_posturl']);
|
||||
|
||||
$xhead = HTTPSig::create_sig($headers, $channel['channel_prvkey'], Channel::url($channel));
|
||||
$xhead = HTTPSig::create_sig($headers, $channel['channel_prvkey'], Channel::keyId($channel));
|
||||
if (strpos($outq['outq_posturl'], 'http') !== 0) {
|
||||
logger('bad url: ' . $outq['outq_posturl']);
|
||||
self::remove($outq['outq_hash']);
|
||||
|
|
|
@ -50,7 +50,7 @@ function as_return_and_die($obj, $channel)
|
|||
$headers['Digest'] = HTTPSig::generate_digest_header($ret);
|
||||
$headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
|
||||
|
||||
$h = HTTPSig::create_sig($headers, $channel['channel_prvkey'], Channel::url($channel));
|
||||
$h = HTTPSig::create_sig($headers, $channel['channel_prvkey'], Channel::keyId($channel));
|
||||
HTTPSig::set_headers($h);
|
||||
|
||||
echo $ret;
|
||||
|
|
|
@ -377,7 +377,7 @@ function photo_upload($channel, $observer, $args)
|
|||
|
||||
$title = ((isset($args['title']) && $args['title']) ? $args['title'] : $args['filename']);
|
||||
|
||||
$desc = htmlspecialchars($alt_desc);
|
||||
$desc = htmlspecialchars($alt_desc, double_encode: false);
|
||||
|
||||
$found_tags = linkify_tags($args['body'], $channel_id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue