Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
remove old/obsolete clear text "adminAccount" credential entry from init and setConfig (.,empty) from servlets/code
regerbad8f8799839
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 4da1eb7df..7c21fb415 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -385,13 +385,12 @@ serverClient=*#use User_p.html to create some Users.use_proxyAccounts=true-# adminAccount: a user:password - pair for administration of+# adminAccountBase64MD5: a encoded user:password - pair for administration of# settings through the web interface# should be set to a secret. By default it is without a password# but you are encouraged to set it to another value on the page# http://localhost:8090/ConfigAccounts_p.html-#adminAccount=admin:mysecretpassword-adminAccount=+#adminAccountBase64=MD5:{admin:realm:mysecretpassword}adminAccountBase64MD5=adminAccountUserName=admindiff --git a/htroot/ConfigAccounts_p.java b/htroot/ConfigAccounts_p.javaindex bcc04f940..ce975f801 100644--- a/htroot/ConfigAccounts_p.java+++ b/htroot/ConfigAccounts_p.java@@ -71,7 +71,6 @@ public class ConfigAccounts_p {// check passed. set account:// old: // env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, Digest.encodeMD5Hex(Base64Order.standardCoder.encodeString(user + ":" + pw1)));env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "MD5:"+Digest.encodeMD5Hex(user + ":" + sb.getConfig(SwitchboardConstants.ADMIN_REALM,"YaCy")+":"+ pw1));- env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT, "");env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME,user);// make sure server accepts new credentialsJetty9HttpServerImpl jhttpserver = (Jetty9HttpServerImpl)sb.getHttpServer();@@ -97,7 +96,6 @@ public class ConfigAccounts_p {if (env.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "").isEmpty()) {// make a 'random' passwordenv.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "0000" + sb.genRandomPassword());- env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT, "");}} else {sb.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_FOR_LOCALHOST, false);diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.javaindex 6334e74cb..e2253adcd 100644--- a/htroot/SettingsAck_p.java+++ b/htroot/SettingsAck_p.java@@ -87,7 +87,6 @@ public class SettingsAck_p {}// check passed. set account:env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "MD5:"+Digest.encodeMD5Hex(user + ":" + sb.getConfig(SwitchboardConstants.ADMIN_REALM,"YaCy") + ":" + pw1));- env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT, "");env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME, user);prop.put("info", "5");//admin account changedprop.putHTML("info_user", user);diff --git a/source/net/yacy/migration.java b/source/net/yacy/migration.javaindex 0878e1783..fdc174904 100644--- a/source/net/yacy/migration.java+++ b/source/net/yacy/migration.java@@ -241,7 +241,6 @@ public class migration {String acc;if ((acc = sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT, "")).length() > 0) {sb.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, Digest.encodeMD5Hex(Base64Order.standardCoder.encodeString(acc)));- sb.setConfig(SwitchboardConstants.ADMIN_ACCOUNT, "");}// fix unsafe old passwordsdiff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex 51d70764a..e564250cf 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -2313,7 +2313,6 @@ public final class Switchboard extends serverSwitch {&& getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "").isEmpty() ) {// make a 'random' password, this will keep the ability to log in from localhost without passwordsetConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "0000" + this.genRandomPassword());- setConfig(SwitchboardConstants.ADMIN_ACCOUNT, "");}// stop greedylearning if limit is reached