mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
another import fix and do not allow importing channels < version 4.7.4 for zot6 compatibility reasons
This commit is contained in:
@@ -137,6 +137,11 @@ class Import extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
if(version_compare($data['compatibility']['version'], '4.7.3', '<=')) {
|
||||
// zot6 transition: cloning is not compatible with older versions
|
||||
notice('Data export format is not compatible with this software (not a zot6 channel)');
|
||||
return;
|
||||
}
|
||||
|
||||
if($moving)
|
||||
$seize = 1;
|
||||
@@ -344,7 +349,7 @@ class Import extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
if($xchan['xchan_network'] === 'zot6') {
|
||||
$zhash = \Zotlabs\Lib\Libzot::make_xchan_hash($xchan['xchan_guid'],$xchan['xchan_pubkey']);
|
||||
$zhash = Libzot::make_xchan_hash($xchan['xchan_guid'],$xchan['xchan_pubkey']);
|
||||
if($zhash !== $xchan['xchan_hash']) {
|
||||
logger('forged xchan: ' . print_r($xchan,true));
|
||||
continue;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Zotlabs\Lib\IConfig;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
@@ -31,7 +32,7 @@ function import_channel($channel, $account_id, $seize, $newname = '') {
|
||||
|
||||
// Ignore the hash provided and re-calculate
|
||||
|
||||
$channel['channel_hash'] = make_xchan_hash($channel['channel_guid'],$channel['channel_guid_sig']);
|
||||
$channel['channel_hash'] = Libzot::make_xchan_hash($channel['channel_guid'],$channel['channel_pubkey']);
|
||||
|
||||
if($newname) {
|
||||
$channel['channel_address'] = $newname;
|
||||
|
||||
Reference in New Issue
Block a user