diff options
author | Zot <mike@macgirvin.com> | 2019-04-26 07:12:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-04-26 10:41:52 +0200 |
commit | b782c6bd162a94becfb7e81feb2edc375b0a3741 (patch) | |
tree | 25f95307ddc9649effbbc4a50a0e7e95897d9861 | |
parent | ab8d8aa552cb8e2d39f4cfac4bfa914154e3263a (diff) | |
download | volse-hubzilla-b782c6bd162a94becfb7e81feb2edc375b0a3741.tar.gz volse-hubzilla-b782c6bd162a94becfb7e81feb2edc375b0a3741.tar.bz2 volse-hubzilla-b782c6bd162a94becfb7e81feb2edc375b0a3741.zip |
update fix_system_urls() to handle zot6 hublocs (recommend cherry-pick to master)
(cherry picked from commit f8c583636cd3d5d6004cd0279ca887fa05fbf315)
-rwxr-xr-x | boot.php | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1507,12 +1507,13 @@ function fix_system_urls($oldurl, $newurl) { dbesc($rv['xchan_hash']) ); - $y = q("update hubloc set hubloc_addr = '%s', hubloc_url = '%s', hubloc_url_sig = '%s', hubloc_host = '%s', hubloc_callback = '%s' where hubloc_hash = '%s' and hubloc_url = '%s'", + $y = q("update hubloc set hubloc_addr = '%s', hubloc_url = '%s', hubloc_id_url = '%s', hubloc_url_sig = '%s', hubloc_host = '%s', hubloc_callback = '%s' where hubloc_hash = '%s' and hubloc_url = '%s'", dbesc($channel_address . '@' . $rhs), dbesc($newurl), - dbesc(base64url_encode(rsa_sign($newurl,$c[0]['channel_prvkey']))), + dbesc(str_replace($oldurl,$newurl,$rv['hubloc_id_url'])), + dbesc(($rv['hubloc_network'] === 'zot6') ? \Zotlabs\Lib\Libzot::sign($newurl,$c[0]['channel_prvkey']) : base64url_encode(rsa_sign($newurl,$c[0]['channel_prvkey']))), dbesc($newhost), - dbesc($newurl . '/post'), + dbesc(($rv['hubloc_network'] === 'zot6') ? $newurl . '/zot' : $newurl . '/post'), dbesc($rv['xchan_hash']), dbesc($oldurl) ); |