Skip to content

Commit e6bd0a7

Browse files
author
Till Brehm
committed
Merge branch 'patch-5' into 'stable-3.1'
Update rest.php to check if remote api is allowed. See merge request ispconfig/ispconfig3!893
2 parents 6006cbf + 5d1673e commit e6bd0a7

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)