log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (entry null) from peer "+iam+"\n\tURL properties: "+propStr);
prop.put("delay","3600");
log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (entry null) from peer "+ohash+"\n\tURL properties: "+propStr);
returnprop;
}
indexURLEntry.Componentscomp=entry.comp();
if(comp.url()==null){
log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (url null) for hash "+entry.hash()+" from peer "+iam+"\n\tURL properties: "+propStr);
prop.put("delay","3600");
log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (url null) for hash "+entry.hash()+" from peer "+ohash+"\n\tURL properties: "+propStr);
returnprop;
}
// check if the entry is in our network domain
if(!switchboard.acceptURL(comp.url())){
log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (url outside of our domain) for hash "+entry.hash()+" from peer "+iam+"\n\tURL properties: "+propStr);
if(!sb.acceptURL(comp.url())){
log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (url outside of our domain) for hash "+entry.hash()+" from peer "+ohash+"\n\tURL properties: "+propStr);
finalStringquery=post.get("query","");// a string of word hashes that shall be searched and combined
Stringabstracts=post.get("abstracts","");// a string of word hashes for abstracts that shall be generated, or 'auto' (for maxcount-word), or '' (for none)
finalStringquery=post.get("query","");// a string of word hashes that shall be searched and combined
finalStringabstracts=post.get("abstracts","");// a string of word hashes for abstracts that shall be generated, or 'auto' (for maxcount-word), or '' (for none)
Stringprocess=post.get("process","");// permission or store
// String key = post.get("key", ""); // a transmission key from the client
@ -81,22 +83,24 @@ public final class transfer {
prop.put("process_path","");
prop.put("process_maxsize","0");
finalplasmaSwitchboardsb=(plasmaSwitchboard)env;
if(sb.isRobinsonMode()||!sb.rankingOn){
// in a robinson environment, do not answer. We do not do any transfer in a robinson cluster.
returnprop;
}
finalyacySeedopeer=yacyCore.seedDB.get(ohash);
if(opeer==null){
finalyacySeedoseed=yacyCore.seedDB.get(ohash);
if(oseed==null){
// reject unknown peers: this does not appear fair, but anonymous senders are dangerous
sb.getLog().logFine("RankingTransmission: rejected unknown peer '"+ohash+"', current IP "+header.get(httpHeader.CONNECTION_PROP_CLIENTIP,"unknown"));
returnprop;
}
opeer.setLastSeenUTC();
oseed.setFlagDirectConnect(true);
oseed.setLastSeenUTC();
if(filename.indexOf("..")>=0){
// reject paths that contain '..' because they are dangerous
sb.getLog().logFine("RankingTransmission: rejected wrong path '"+filename+"' from peer "+opeer.getName()+"/"+opeer.getPublicAddress()+", current IP "+header.get(httpHeader.CONNECTION_PROP_CLIENTIP,"unknown"));
sb.getLog().logFine("RankingTransmission: rejected wrong path '"+filename+"' from peer "+oseed.getName()+"/"+oseed.getPublicAddress()+", current IP "+header.get(httpHeader.CONNECTION_PROP_CLIENTIP,"unknown"));
returnprop;
}
@ -114,7 +118,7 @@ public final class transfer {
prop.put("process_path","");// currently empty; the store process will find a path
prop.put("process_maxsize","-1");// if response is too big we return the size of the file