Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
remove local credential on download of config files from remote systems (blacklists, language, skins) to reduce risk to expose md5-pwd. - remove NoSuchElementException in loop
reger9636a7463339
diff --git a/htroot/BlacklistImpExp_p.java b/htroot/BlacklistImpExp_p.javaindex b832f4da0..2027ec698 100644--- a/htroot/BlacklistImpExp_p.java+++ b/htroot/BlacklistImpExp_p.java@@ -72,12 +72,10 @@ public class BlacklistImpExp_p {if (seed != null) hostList.put(seed.get(Seed.NAME, "nameless"),seed.hash);}- String peername;- while ((peername = hostList.firstKey()) != null) {+ for (String peername : hostList.keySet()) {final String Hash = hostList.get(peername);prop.putHTML(DISABLED + "otherHosts_" + peerCount + "_hash", Hash);prop.putXML(DISABLED + "otherHosts_" + peerCount + "_name", peername);- hostList.remove(peername);peerCount++;}} catch (final Exception e) {diff --git a/htroot/ConfigAppearance_p.java b/htroot/ConfigAppearance_p.javaindex 8635e90a3..2051e2aec 100644--- a/htroot/ConfigAppearance_p.java+++ b/htroot/ConfigAppearance_p.java@@ -102,7 +102,7 @@ public class ConfigAppearance_p {final Iterator<String> it;try {final DigestURL u = new DigestURL(url);- it = FileUtils.strings(u.get(ClientIdentification.yacyInternetCrawlerAgent, sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME, "admin"), sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "")));+ it = FileUtils.strings(u.get(ClientIdentification.yacyInternetCrawlerAgent, null, null));} catch (final IOException e) {prop.put("status", "1");// unable to get URLprop.put("status_url", url);diff --git a/htroot/ConfigLanguage_p.java b/htroot/ConfigLanguage_p.javaindex 65d2b076c..2210e389b 100644--- a/htroot/ConfigLanguage_p.java+++ b/htroot/ConfigLanguage_p.java@@ -46,7 +46,6 @@ import net.yacy.data.Translator;import net.yacy.data.WorkTables;import net.yacy.kelondro.util.FileUtils;import net.yacy.search.Switchboard;-import net.yacy.search.SwitchboardConstants;import net.yacy.server.serverObjects;import net.yacy.server.serverSwitch;@@ -102,7 +101,7 @@ public class ConfigLanguage_p {Iterator<String> it;try {final DigestURL u = new DigestURL(url);- it = FileUtils.strings(u.get(ClientIdentification.yacyInternetCrawlerAgent, sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME, "admin"), sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "")));+ it = FileUtils.strings(u.get(ClientIdentification.yacyInternetCrawlerAgent, null, null));} catch(final IOException e) {prop.put("status", "1");//unable to get urlprop.put("status_url", url);diff --git a/htroot/sharedBlacklist_p.java b/htroot/sharedBlacklist_p.javaindex cffeed8f2..931c8061d 100644--- a/htroot/sharedBlacklist_p.java+++ b/htroot/sharedBlacklist_p.java@@ -51,7 +51,6 @@ import net.yacy.peers.Seed;import net.yacy.repository.Blacklist;import net.yacy.repository.Blacklist.BlacklistType;import net.yacy.search.Switchboard;-import net.yacy.search.SwitchboardConstants;import net.yacy.search.query.SearchEventCache;import net.yacy.server.serverObjects;import net.yacy.server.serverSwitch;@@ -140,7 +139,7 @@ public class sharedBlacklist_p {// get Listfinal DigestURL u = new DigestURL(downloadURLOld);- otherBlacklist = FileUtils.strings(u.get(agent, sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME, "admin"), sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "")));+ otherBlacklist = FileUtils.strings(u.get(agent, null, null));} catch (final Exception e) {prop.put("status", STATUS_PEER_UNKNOWN);prop.putHTML("status_name", hash);@@ -157,7 +156,7 @@ public class sharedBlacklist_p {try {final DigestURL u = new DigestURL(downloadURL);- otherBlacklist = FileUtils.strings(u.get(agent, sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME, "admin"), sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "")));+ otherBlacklist = FileUtils.strings(u.get(agent, null, null));} catch (final Exception e) {prop.put("status", STATUS_URL_PROBLEM);prop.putHTML("status_address",downloadURL);