create_sys_channel during setup bypasses our check when creating the first account that there is a site keypair. Esnure that a site keypair is created before any sys channels are created.
This commit is contained in:
parent
02af02118d
commit
944d051e45
@ -80,6 +80,15 @@ function validate_channelname($name) {
|
||||
function create_sys_channel() {
|
||||
if(get_sys_channel())
|
||||
return;
|
||||
|
||||
// Ensure that there is a host keypair.
|
||||
|
||||
if((! get_config('system','pubkey')) && (! get_config('system','prvkey'))) {
|
||||
$hostkey = new_keypair(4096);
|
||||
set_config('system','pubkey',$hostkey['pubkey']);
|
||||
set_config('system','prvkey',$hostkey['prvkey']);
|
||||
}
|
||||
|
||||
create_identity(array(
|
||||
'account_id' => 'xxx', // This will create an identity with an (integer) account_id of 0, but account_id is required
|
||||
'nickname' => 'sys',
|
||||
|
@ -943,6 +943,8 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED) {
|
||||
$ret['hash'] = $xchan_hash;
|
||||
}
|
||||
|
||||
|
||||
|
||||
logger('import_xchan: result: ' . print_r($ret,true), LOGGER_DATA);
|
||||
return $ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user