Skip to content

Commit 5d1673e

Browse files
committed
Update rest.php to check if remote api is allowed.
1 parent 6006cbf commit 5d1673e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

interface/web/remote/rest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
$conf['start_session'] = false;
77
require_once '../../lib/app.inc.php';
88

9-
$app->load('rest_handler');
9+
$app->load('rest_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+
1014
$rest_handler = new ISPConfigRESTHandler();
1115
$rest_handler->run();
1216

0 commit comments

Comments
 (0)