diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-16 15:20:45 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-16 15:20:45 -0700 |
commit | cf7481da53d051c385dbff8d813befc34c8f68ef (patch) | |
tree | 222fb9c5ab70c349c9474bd3c6ea1fc129dc8f70 /include/zot.php | |
parent | a33562144bcfa889cc1bd333fb9a75422c9c2da5 (diff) | |
download | volse-hubzilla-cf7481da53d051c385dbff8d813befc34c8f68ef.tar.gz volse-hubzilla-cf7481da53d051c385dbff8d813befc34c8f68ef.tar.bz2 volse-hubzilla-cf7481da53d051c385dbff8d813befc34c8f68ef.zip |
regression in zot site info after zot6 work
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php index da1f3bfa1..55632fc31 100644 --- a/include/zot.php +++ b/include/zot.php @@ -4201,8 +4201,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); @@ -4213,7 +4212,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'); @@ -4221,7 +4220,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'; |