mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
_flag_disable_trust_localhost
This commit is contained in:
parent
3fcd56a1a1
commit
21ece3c393
2 changed files with 3 additions and 2 deletions
|
@ -189,6 +189,7 @@ mixed unMarshal(XMLNode parsed) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// why is this almost the same code as in http/fetch?
|
||||||
int disconnected(string remainder) {
|
int disconnected(string remainder) {
|
||||||
mixed *args;
|
mixed *args;
|
||||||
|
|
||||||
|
|
|
@ -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
|
// we sincerely hope our kernel will drop udp packets that
|
||||||
// spoof they are coming from localhost.. would be ridiculous if not
|
// spoof they are coming from localhost.. would be ridiculous if not
|
||||||
// if (ip == "127.0.0.1" || ip == "127.1" || ip == "0") return 9;
|
// 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 (localhosts[ip]) return 9;
|
||||||
if (ip == myIP || !ip) return 8;
|
if (ip == myIP || !ip) return 8;
|
||||||
#endif
|
#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
|
// spoof they are coming from localhost.. would be ridiculous if not
|
||||||
//
|
//
|
||||||
// TODO: use is_localhost here?
|
// TODO: use is_localhost here?
|
||||||
#ifndef DONT_TRUST_LOCALHOST
|
#ifndef _flag_disable_trust_localhost
|
||||||
if (host == "localhost" || host == SERVER_HOST) return 9;
|
if (host == "localhost" || host == SERVER_HOST) return 9;
|
||||||
#endif
|
#endif
|
||||||
// if (host == myLowerCaseHost) return 8;
|
// if (host == myLowerCaseHost) return 8;
|
||||||
|
|
Loading…
Reference in a new issue