Skip to content

Commit 3dd4c11

Browse files
author
Florian Schaal
committed
add security-check for remote api allowed to remote/json.php
1 parent 646e44b commit 3dd4c11

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

interface/web/remote/json.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
$conf['start_session'] = false;
55
require_once '../../lib/app.inc.php';
66

7-
$app->load('json_handler');
7+
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
8+
9+
$app->load('json_handler,getconf');
10+
11+
$security_config = $app->getconf->get_security_config('permissions');
12+
if($security_config['remote_api_allowed'] != 'yes') die('Remote API is disabled in security settings.');
13+
814
$json_handler = new ISPConfigJSONHandler();
915
$json_handler->run();
1016

0 commit comments

Comments
 (0)