added configuration switch for xmlrpc and soap services (default off)

This commit is contained in:
Ralf Becker 2005-09-10 10:39:36 +00:00
parent b837962ac8
commit e72ec322e1
4 changed files with 34 additions and 1 deletions

View File

@ -210,6 +210,26 @@
</td>
</tr>
<tr class="row_off">
<td>{lang_Enable_the_xmlrpc_service} {lang_(default_No,_leave_it_off_if_you_dont_use_it)}:</td>
<td>
<select name="newsettings[xmlrpc_enabled]">
<option value="">{lang_No}</option>
<option value="True"{selected_xmlrpc_enabled_True}>{lang_Yes}</option>
</select>
</td>
</tr>
<tr class="row_on">
<td>{lang_Enable_the_soap_service} {lang_(default_No,_leave_it_off_if_you_dont_use_it)}:</td>
<td>
<select name="newsettings[soap_enabled]">
<option value="">{lang_No}</option>
<option value="True"{selected_soap_enabled_True}>{lang_Yes}</option>
</select>
</td>
</tr>
<tr class="th">
<td colspan="2">&nbsp;<b>{lang_Mail_settings}</b></td>
</tr>

View File

@ -29,7 +29,7 @@
function service($data)
{
// $response is a soap_msg object
$response = $this->parseRequest($data);
$response = get_class($data) == 'soapmsg' ? $date : $this->parseRequest($data);
$this->debug("parsed request and got an object of this class '".get_class($response)."'");
$this->debug("server sending...");
// pass along the debug string

View File

@ -25,6 +25,13 @@
/* _debug_array($GLOBALS['server']);exit; */
/* include(EGW_API_INC . '/soaplib.soapinterop.php'); */
if (!$GLOBALS['egw_info']['server']['soap_enabled'])
{
$GLOBALS['server']->make_fault(9999,'soap service is not enabled in the eGroupWare system configuration');
$GLOBALS['server']->service($GLOBALS['server']->fault());
exit;
}
/* Note: this command only available under Apache */
$headers = getallheaders();

View File

@ -30,6 +30,12 @@
/* uncomment here if you want to show all of the testing functions for compatibility */
//include(EGW_API_INC . '/xmlrpc.interop.php');
if (!$GLOBALS['egw_info']['server']['xmlrpc_enabled'])
{
$server->xmlrpc_error(9999,'xmlrpc service is not enabled in the eGroupWare system configuration');
exit;
}
/* Note: this command only available under Apache */
$headers = getallheaders();