Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
BF Bugfix
orbiter6f1a3fce057a
diff --git a/htroot/Blog.java b/htroot/Blog.javaindex 924b5a642..52f7bc78a 100644--- a/htroot/Blog.java+++ b/htroot/Blog.java@@ -105,7 +105,7 @@ public class Blog {final int num = post.getInt("num",10); //indicates how many entries should be shownif(!hasRights){- final userDB.Entry userentry = sb.userDB.proxyAuth((String)header.get("Authorization", "xxxxxx"));+ final userDB.Entry userentry = sb.userDB.proxyAuth((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx"));if(userentry != null && userentry.hasRight(userDB.Entry.BLOG_RIGHT)){hasRights=true;} else if(post.containsKey("login")) {diff --git a/htroot/BlogComments.java b/htroot/BlogComments.javaindex 4b4b2169d..fbe25123b 100644--- a/htroot/BlogComments.java+++ b/htroot/BlogComments.java@@ -91,7 +91,7 @@ public class BlogComments {}if(!hasRights){- userDB.Entry userentry = sb.userDB.proxyAuth((String)header.get("Authorization", "xxxxxx"));+ userDB.Entry userentry = sb.userDB.proxyAuth((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx"));if(userentry != null && userentry.hasRight(userDB.Entry.BLOG_RIGHT)){hasRights=true;}diff --git a/htroot/CrawlResults.java b/htroot/CrawlResults.javaindex a03fdfcb0..9ec7df05d 100644--- a/htroot/CrawlResults.java+++ b/htroot/CrawlResults.java@@ -77,7 +77,7 @@ public class CrawlResults {if (((tabletype > 0) && (tabletype < 6)) ||(post.containsKey("clearlist")) ||(post.containsKey("deleteentry"))) {- String authorization = ((String) header.get("Authorization", "xxxxxx"));+ String authorization = ((String) header.get(httpHeader.AUTHORIZATION, "xxxxxx"));if (authorization.length() != 0) {if (! sb.verifyAuthentication(header, true)){// force log-in (again, because wrong password was given)diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex f90aebbdb..15e96b83a 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -303,6 +303,7 @@ public final class httpdFileHandler {// check permission/granted accessString authorization = (String) requestHeader.get(httpHeader.AUTHORIZATION);+ if (authorization != null && authorization.length() == 0) authorization = null;String adminAccountBase64MD5 = switchboard.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "");int pos = path.lastIndexOf(".");@@ -645,7 +646,6 @@ public final class httpdFileHandler {if (authorization != null) {serverLog.logInfo("HTTPD", "dynamic log-in for account 'admin' in http file handler for path '" + path + "' from host '" + clientIP + "'");Integer attempts = (Integer) serverCore.bfHost.get(clientIP);- if (attempts != null) try {Thread.sleep(1000 * attempts.intValue());} catch (InterruptedException e) {}if (attempts == null)serverCore.bfHost.put(clientIP, new Integer(1));elsediff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 1099f5789..61f7d95ea 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -359,7 +359,7 @@ public final class serverCore extends serverAbstractBusyThread implements serverthis.log.logWarning("SLOWING DOWN ACCESS FOR BRUTE-FORCE PREVENTION FROM " + cIP + ", ATTEMPT " + attempts.intValue());// add a delay to make brute-force harderannounceThreadBlockApply();- try {Thread.sleep(attempts.intValue() * 2000);} catch (InterruptedException e) {}+ try {Thread.sleep(attempts.intValue() /*BFPATCH*/);} catch (InterruptedException e) {}announceThreadBlockRelease();if ((attempts.intValue() >= 10) && (this.denyHost != null)) {this.denyHost.put(cIP, "deny");diff --git a/source/yacy.java b/source/yacy.javaindex 8f48c5cbf..3a1c03647 100644--- a/source/yacy.java+++ b/source/yacy.java@@ -536,7 +536,7 @@ public final class yacy {// send 'wget' to web interfacehttpHeader requestHeader = new httpHeader();- requestHeader.put("Authorization", "realm=" + encodedPassword); // for http-authentify+ requestHeader.put(httpHeader.AUTHORIZATION, "realm=" + encodedPassword); // for http-authentifyJakartaCommonsHttpClient con = new JakartaCommonsHttpClient(10000, requestHeader, null);JakartaCommonsHttpResponse res = null;try {