aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-16 15:20:45 -0700
committerzotlabs <mike@macgirvin.com>2017-10-16 15:23:17 -0700
commit4dd05dc4e88171fb2bcaacde8c0699f64f6bb7e5 (patch)
tree4d3bd8515927a63af49ef0bd0e6391669534d615
parentccbc532c1a2ea967aa5dd83514ab1c71109fd3c8 (diff)
downloadvolse-hubzilla-4dd05dc4e88171fb2bcaacde8c0699f64f6bb7e5.tar.gz
volse-hubzilla-4dd05dc4e88171fb2bcaacde8c0699f64f6bb7e5.tar.bz2
volse-hubzilla-4dd05dc4e88171fb2bcaacde8c0699f64f6bb7e5.zip
regression in zot site info after zot6 work
-rw-r--r--include/zot.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index b6df6bca8..3fa62445c 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -4200,8 +4200,7 @@ function zotinfo($arr) {
if($x)
$ret['locations'] = $x;
- $ret['site'] = zot_site_info();
-
+ $ret['site'] = zot_site_info($e['xchan_pubkey']);
check_zotinfo($e,$x,$ret);
@@ -4212,7 +4211,7 @@ function zotinfo($arr) {
}
-function zot_site_info() {
+function zot_site_info($channel_key = '') {
$signing_key = get_config('system','prvkey');
$sig_method = get_config('system','signature_algorithm','sha256');
@@ -4220,7 +4219,10 @@ function zot_site_info() {
$ret = [];
$ret['site'] = [];
$ret['site']['url'] = z_root();
- $ret['site']['url_sig'] = base64url_encode(rsa_sign(z_root(),$signing_key,$sig_method));
+ if($channel_key) {
+ $ret['site']['url_sig'] = base64url_encode(rsa_sign(z_root(),$channel_key,$sig_method));
+ }
+ $ret['site']['url_site_sig'] = base64url_encode(rsa_sign(z_root(),$signing_key,$sig_method));
$ret['site']['post'] = z_root() . '/post';
$ret['site']['openWebAuth'] = z_root() . '/owa';
$ret['site']['authRedirect'] = z_root() . '/magic';