better (and corrected) recognition of intranet and internet-addresses. This corrects the isLocal property that is used by network definitions to restrict index ranges to local and global addresses. Address locations (intranet or internet) had been partly identified by the top level domain of the host address. Since intranet addresses can also be addressed using a host name that is in a country domain it is necessary to do a dns resolving for each check. The check is supported by a local dns cache so the intranet/internet check should not affect network traffic too much. To ensure that the cache works properly the cache class was upgraded to better concurrency data structures.
yacyCore.log.logInfo("yacyClient.publishMySeed thread '"+Thread.currentThread().getName()+"' contacted peer at "+address+", received "+((content==null)?"null":content.length)+" bytes, time = "+(System.currentTimeMillis()-start)+" milliseconds");
// check if this loads a page from localhost, which must be prevented to protect the server
// against attacks to the administration interface when localhost access is granted
if(Domains.isLocal(host)&&sb.getConfigBool("adminAccountForLocalhost",false))thrownewIOException("access to localhost not granted for url "+request.url());
if(url.isLocal()&&sb.getConfigBool("adminAccountForLocalhost",false))thrownewIOException("access to localhost not granted for url "+ url);
// check if we have the page in the cache
@ -165,8 +165,8 @@ public final class LoaderDispatcher {
// we have passed a first test if caching is allowed