Commit 5d1673ed authored by Jesse Norell's avatar Jesse Norell

Update rest.php to check if remote api is allowed.

parent 6006cbf0
......@@ -6,7 +6,11 @@ require_once '../../lib/config.inc.php';
$conf['start_session'] = false;
require_once '../../lib/app.inc.php';
$app->load('rest_handler');
$app->load('rest_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.');
$rest_handler = new ISPConfigRESTHandler();
$rest_handler->run();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment