Commit e6bd0a7d authored by Till Brehm's avatar Till Brehm

Merge branch 'patch-5' into 'stable-3.1'

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

See merge request !893
parents 6006cbf0 5d1673ed
Pipeline #1118 passed with stage
in 2 minutes and 35 seconds
...@@ -6,7 +6,11 @@ require_once '../../lib/'; ...@@ -6,7 +6,11 @@ require_once '../../lib/';
$conf['start_session'] = false; $conf['start_session'] = false;
require_once '../../lib/'; require_once '../../lib/';
$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 = new ISPConfigRESTHandler();
$rest_handler->run(); $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