Commit 6645a7e5 authored by Donal McMullan's avatar Donal McMullan
Browse files

New switch for masquerading to be allowed

parent 675ece0d
......@@ -100,7 +100,7 @@ if ($xml->getName() == 'encryptedMessage') {
$ipaddress = gethostbyname(get_hostname_from_uri((string)$xml->wwwroot));
// Check for masquerading
if ($ipaddress != $_SERVER['REMOTE_ADDR']) {
if (!get_config('xmlrpc_allow_masquerading') && $ipaddress != $_SERVER['REMOTE_ADDR']) {
if ($networkingdebug) {
throw new XmlrpcServerException('Your hostname ('.
get_hostname_from_uri((string)$xml->wwwroot) .
......@@ -123,7 +123,7 @@ if ($xml->getName() == 'signedMessage') {
$ipaddress = gethostbyname(get_hostname_from_uri((string)$xml->wwwroot));
// Check for masquerading
if ($ipaddress != $_SERVER['REMOTE_ADDR']) {
if (!get_config('xmlrpc_allow_masquerading') && $ipaddress != $_SERVER['REMOTE_ADDR']) {
if ($networkingdebug) {
throw new XmlrpcServerException('Your hostname ('.
get_hostname_from_uri((string)$xml->wwwroot) .
......
......@@ -96,4 +96,10 @@ $cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON;
// enter them here
// $cfg->smtpuser = '';
// $cfg->smtppass = '';
// xmlrpc
// if you're running in a configuration where the host contacting you will be
// using an IP address that is not the same as the IP address that is registered
// for its host name, then you should change the value below to 'true'.
$cfg->xmlrpc_allow_masquerading = false;
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment