From c02a9301215ac146c26346ebc633d7c808cea5ee Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 9 Aug 2013 01:20:34 -0700 Subject: move sitekey creation to the account creation function instead of during channel creation. Channel import bypassed sitekey creation completely. We should do it during install, but it's possible somebody might have to install manually and the sitekey would never get created. This is the best compromise I can come up with. Looks like the doc tree was also updated in this checkin --- include/account.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/account.php') diff --git a/include/account.php b/include/account.php index b7fd3ef28..6dfb5ae1e 100644 --- a/include/account.php +++ b/include/account.php @@ -133,6 +133,13 @@ function create_account($arr) { if(($c === 0) && (check_account_admin($arr))) $roles |= ACCOUNT_ROLE_ADMIN; + // 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']); + } $invite_result = check_account_invite($invite_code); if($invite_result['error']) { -- cgit v1.2.3