Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

no negative values See http://www.yacy-forum.de/viewtopic.php?t=1021

borg-0300eac34cf772dc
diff --git a/htroot/ProxyIndexingMonitor_p.java b/htroot/ProxyIndexingMonitor_p.java
index c4a2ae5af..e2679c995 100644
--- a/htroot/ProxyIndexingMonitor_p.java
+++ b/htroot/ProxyIndexingMonitor_p.java
@@ -82,6 +82,8 @@ public class ProxyIndexingMonitor_p {
if (post.containsKey("proxyprofileset")) try {
// read values and put them in global settings
int newProxyPrefetchDepth = Integer.parseInt((String) post.get("proxyPrefetchDepth", "0"));
+ if (newProxyPrefetchDepth < 0) newProxyPrefetchDepth = 0;
+ if (newProxyPrefetchDepth > 25) newProxyPrefetchDepth = 25; // self protection ?
env.setConfig("proxyPrefetchDepth", Integer.toString(newProxyPrefetchDepth));
boolean proxyStoreHTCache = ((String) post.get("proxyStoreHTCache", "")).equals("on");
env.setConfig("proxyStoreHTCache", (proxyStoreHTCache) ? "true" : "false");