From 21ece3c393f23b588e1bb09d3203da855240f579 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Wed, 22 Apr 2009 08:52:26 +0200 Subject: [PATCH] _flag_disable_trust_localhost --- world/net/http/xmlrpc.c | 1 + world/net/library/dns.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/world/net/http/xmlrpc.c b/world/net/http/xmlrpc.c index 75c8a67..e65292d 100644 --- a/world/net/http/xmlrpc.c +++ b/world/net/http/xmlrpc.c @@ -189,6 +189,7 @@ mixed unMarshal(XMLNode parsed) { } } +// why is this almost the same code as in http/fetch? int disconnected(string remainder) { mixed *args; diff --git a/world/net/library/dns.c b/world/net/library/dns.c index b558379..cd96d42 100644 --- a/world/net/library/dns.c +++ b/world/net/library/dns.c @@ -107,7 +107,7 @@ int legal_host(string ip, int port, string scheme, int udpflag) { // proto.h! // we sincerely hope our kernel will drop udp packets that // spoof they are coming from localhost.. would be ridiculous if not // if (ip == "127.0.0.1" || ip == "127.1" || ip == "0") return 9; -#ifndef DONT_TRUST_LOCALHOST +#ifndef _flag_disable_trust_localhost if (localhosts[ip]) return 9; if (ip == myIP || !ip) return 8; #endif @@ -123,7 +123,7 @@ int legal_domain(string host, int port, string scheme, int udpflag) { // spoof they are coming from localhost.. would be ridiculous if not // // TODO: use is_localhost here? -#ifndef DONT_TRUST_LOCALHOST +#ifndef _flag_disable_trust_localhost if (host == "localhost" || host == SERVER_HOST) return 9; #endif // if (host == myLowerCaseHost) return 8;