Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Security Hot-Fix: for transparent proxy.
reger8cbc1c970ae1
diff --git a/source/net/yacy/http/AbstractRemoteHandler.java b/source/net/yacy/http/AbstractRemoteHandler.javaindex e660759bb..932571774 100644--- a/source/net/yacy/http/AbstractRemoteHandler.java+++ b/source/net/yacy/http/AbstractRemoteHandler.java@@ -82,6 +82,9 @@ abstract public class AbstractRemoteHandler extends AbstractHandler implements HHttpServletResponse response) throws IOException, ServletException {String host = request.getHeader("Host");if (host == null) return; // no proxy request, continue processing by handlers++ if (!Switchboard.getSwitchboard().getConfigBool("isTransparentProxy", false)) return;+int hostSplitPos = host.indexOf(':');String hostOnly = hostSplitPos < 0 ? host : host.substring(0, hostSplitPos);@@ -91,7 +94,13 @@ abstract public class AbstractRemoteHandler extends AbstractHandler implements HlocalVirtualHostNames.add(sb.peers.myIP()); // not available on init, add it now for quickcheckreturn;}++ String remoteHost = request.getRemoteHost();+ InetAddress remoteIP = Domains.dnsResolve(remoteHost);+ if (!remoteIP.isAnyLocalAddress()) return;+handleRemote(target, baseRequest, request, response);+}}