Skip to content
Snippets Groups Projects
Commit 3dd4c111 authored by Florian Schaal's avatar Florian Schaal
Browse files

add security-check for remote api allowed to remote/json.php

parent 646e44b0
No related branches found
No related tags found
No related merge requests found
......@@ -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