Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
include check to prevent adding username identical with static admin in ConfigAccounts_p
regera0705c049d14
diff --git a/htroot/ConfigAccounts_p.html b/htroot/ConfigAccounts_p.htmlindex 77de2476e..0d8ade6a9 100644--- a/htroot/ConfigAccounts_p.html+++ b/htroot/ConfigAccounts_p.html@@ -23,6 +23,8 @@<p class="error">Passwords do not match.</p>::<p class="error">Username too short. Username must be >= 4 Characters.</p>+ ::+ <p class="error">Username already used (not allowed).</p>#(/error)##(passwordNotSetWarning)#::<div class="error">No password is set for the administration account. Please define a password for the admin account.</div>#(/passwordNotSetWarning)#diff --git a/htroot/ConfigAccounts_p.java b/htroot/ConfigAccounts_p.javaindex ce975f801..d21ec6d4d 100644--- a/htroot/ConfigAccounts_p.java+++ b/htroot/ConfigAccounts_p.java@@ -185,7 +185,11 @@ public class ConfigAccounts_p {prop.put("error", "2"); //PW does not matchreturn prop;}-+ // do not allow same username as staticadmin+ if (username.equalsIgnoreCase(sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME,"admin"))) {+ prop.put("error", "4");+ return prop;+ }final String firstName = post.get("firstname");final String lastName = post.get("lastname");final String address = post.get("address");diff --git a/locales/master.lng.xlf b/locales/master.lng.xlfindex 6c75e9783..d337e90d8 100644--- a/locales/master.lng.xlf+++ b/locales/master.lng.xlf@@ -843,6 +843,9 @@<trans-unit id="6ad966f5" xml:space="preserve" approved="no" translate="yes"><source>Username too short. Username must be &gt;= 4 Characters.</source></trans-unit>+ <trans-unit id="1bf77769" xml:space="preserve" approved="no" translate="yes">+ <source>Username already used (not allowed).</source>+ </trans-unit><trans-unit id="e79780cf" xml:space="preserve" approved="no" translate="yes"><source>No password is set for the administration account.</source></trans-unit>