aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-03-25 11:29:00 +0000
committerMario <mario@mariovavti.com>2020-03-25 11:29:00 +0000
commit0c1c386a0af1e8dabaf7acf345dffa5cf5ad89eb (patch)
tree8d0bad984eea3c3da0c4c95d7bf1ecc61905c7e4 /include/zot.php
parent4eaddd12796cd49e9ee5d5527e2eaa519279d57e (diff)
downloadvolse-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.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php8
1 files changed, 4 insertions, 4 deletions
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),