From d8faa4e7e3fb74e554f6c9339f6fe4e2883c3bf1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 18 Sep 2015 13:43:03 -0400
Subject: [PATCH] Fix by dirkd: Since file() doesn't remove "\n" from the lines read the condition $lines[$l] == '' never evaluated to true. So $mailHeaders would always contain every line from the template while $mailBody contained none of them.
---
interface/web/remote/index.php | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/interface/web/remote/index.php b/interface/web/remote/index.php
index 2ce9220..3e11139 100644
--- a/interface/web/remote/index.php
+++ b/interface/web/remote/index.php
@@ -1,15 +1,18 @@
<?php
-require_once('../../lib/config.inc.php');
+require_once '../../lib/config.inc.php';
$conf['start_session'] = false;
-require_once('../../lib/app.inc.php');
+require_once '../../lib/app.inc.php';
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
-$app->load('soap_handler');
+$app->load('soap_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.');
$server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));
$server->setObject(new ISPConfigSoapHandler());
$server->handle();
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1