Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed IS_ADMIN - feature. This was covered by plasmaSwitchborad.adminAuthenticated
orbitere17df64b54af
diff --git a/htroot/Status.java b/htroot/Status.javaindex 39a71b676..81ffd4ddb 100644--- a/htroot/Status.java+++ b/htroot/Status.java@@ -74,7 +74,7 @@ public class Status {// update seed infoyacyCore.peerActions.updateMySeed();- if (header.get("IS_ADMIN","false").equals("true")) {+ if (((plasmaSwitchboard) env).adminAuthenticated(header) >= 2) {prop.put("privateStatusTable","Status_p.inc");} else {prop.put("privateStatusTable","");diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex 432f3687e..428884a25 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -260,16 +260,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http// check permission/granted accessString authorization = (String) requestHeader.get(httpHeader.AUTHORIZATION);String adminAccountBase64MD5 = switchboard.getConfig("adminAccountBase64MD5", "");- if( authorization != null && adminAccountBase64MD5.equals(serverCodings.standardCoder.encodeMD5Hex(authorization.trim().substring(6))) ){- requestHeader.put("IS_ADMIN", "true");- }else{- //WARNING: This line ist very important, do not remove!- //It resets the virtual header to false, so nobody can provide- //a real header IS_ADMIN: true to gain adminrights- requestHeader.put("IS_ADMIN", "false");- }-- if ((path.endsWith("_p.html")) && (adminAccountBase64MD5.length() != 0)) {+ if ((path.endsWith("_p.html")) && (adminAccountBase64MD5.length() != 0)) {// authentication requiredif (authorization == null) {// no authorization given in response. Ask for that@@ -277,8 +268,8 @@ public final class httpdFileHandler extends httpdAbstractHandler implements httpheaders.put(httpHeader.WWW_AUTHENTICATE,"Basic realm=\"admin log-in\"");httpd.sendRespondHeader(conProp,out,httpVersion,401,headers);return;- } else if (requestHeader.get("IS_ADMIN", "false") == "true") {- // remove brute-force flag+ } else if (adminAccountBase64MD5.equals(serverCodings.standardCoder.encodeMD5Hex(authorization.trim().substring(6)))) {+ // Authentication successfull. remove brute-force flagserverCore.bfHost.remove(conProp.getProperty("CLIENTIP"));} else {// a wrong authentication was given. Ask again