Skip to content
Snippets Groups Projects
Commit 652c0b9f authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'stable-3.1' into 'stable-3.1'

Stable 3.1

See merge request ispconfig/ispconfig3!681
parents c8f8fee6 3dd4c111
No related branches found
No related tags found
No related merge requests found
......@@ -551,8 +551,9 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon
//** Customise the port ISPConfig runs on
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
$conf['interface_password'] = $inst->free_query('Admin password', 'admin','ispconfig_admin_password');
if($conf['interface_password'] != 'admin') {
$temp_admin_password = str_shuffle(bin2hex(openssl_random_pseudo_bytes(4)));
$conf['interface_password'] = $inst->free_query('Admin password', $temp_admin_password, 'ispconfig_admin_password');
if($conf['interface_password'] != $temp_admin_password) {
$check = false;
do {
unset($temp_password);
......@@ -563,6 +564,7 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon
}
unset($check);
unset($temp_password);
unset($temp_admin_password);
if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port;
if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port;
unset($ispconfig_vhost_port);
......
......@@ -4,7 +4,13 @@ require_once '../../lib/config.inc.php';
$conf['start_session'] = false;
require_once '../../lib/app.inc.php';
$app->load('json_handler');
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
$app->load('json_handler,getconf');
$security_config = $app->getconf->get_security_config('permissions');
if($security_config['remote_api_allowed'] != 'yes') die('Remote API is disabled in security settings.');
$json_handler = new ISPConfigJSONHandler();
$json_handler->run();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment