diff options
author | Mario <mario@mariovavti.com> | 2020-03-25 11:29:00 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-03-25 11:29:00 +0000 |
commit | 0c1c386a0af1e8dabaf7acf345dffa5cf5ad89eb (patch) | |
tree | 8d0bad984eea3c3da0c4c95d7bf1ecc61905c7e4 | |
parent | 4eaddd12796cd49e9ee5d5527e2eaa519279d57e (diff) | |
download | volse-hubzilla-0c1c386a0af1e8dabaf7acf345dffa5cf5ad89eb.tar.gz volse-hubzilla-0c1c386a0af1e8dabaf7acf345dffa5cf5ad89eb.tar.bz2 volse-hubzilla-0c1c386a0af1e8dabaf7acf345dffa5cf5ad89eb.zip |
do not use channel_portable_id in process_channel_sync_delivery(). we should only accept sync packages from channels which are already transitioned to zot6.
-rw-r--r-- | Zotlabs/Lib/Libsync.php | 2 | ||||
-rw-r--r-- | include/zot.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index c39720735..de389c0a9 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -1022,4 +1022,4 @@ class Libsync { } -}
\ No newline at end of file +} diff --git a/include/zot.php b/include/zot.php index bb5537d2e..5cf357d40 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3454,7 +3454,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { $keychange = ((array_key_exists('keychange',$arr)) ? true : false); foreach ($deliveries as $d) { - $r = q("select * from channel where channel_portable_id = '%s' limit 1", + $r = q("select * from channel where channel_hash = '%s' limit 1", dbesc(($keychange) ? $arr['keychange']['old_hash'] : $d['hash']) ); @@ -3468,8 +3468,8 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { $max_friends = service_class_fetch($channel['channel_id'],'total_channels'); $max_feeds = account_service_class_fetch($channel['channel_account_id'],'total_feeds'); - if($channel['channel_portable_id'] != $sender['hash']) { - logger('Possible forgery. Sender ' . $sender['hash'] . ' is not ' . $channel['channel_portable_id']); + if($channel['channel_hash'] != $sender['hash']) { + logger('Possible forgery. Sender ' . $sender['hash'] . ' is not ' . $channel['channel_hash']); $result[] = array($d['hash'],'channel mismatch',$channel['channel_name'],''); continue; } @@ -3486,7 +3486,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { $r = q("update channel set channel_prvkey = '%s', channel_pubkey = '%s', channel_guid_sig = '%s', - channel_portable_id = '%s' where channel_id = %d", + channel_hash = '%s' where channel_id = %d", dbesc($arr['channel']['channel_prvkey']), dbesc($arr['channel']['channel_pubkey']), dbesc($sig), |