Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Using Orbiters function for auth
allo6822dce57bfb
diff --git a/htroot/IndexMonitor.java b/htroot/IndexMonitor.javaindex dfc8e40a3..3a015f938 100644--- a/htroot/IndexMonitor.java+++ b/htroot/IndexMonitor.java@@ -80,7 +80,7 @@ public class IndexMonitor {(post.containsKey("deleteentry"))) {String authorization = ((String) header.get("Authorization", "xxxxxx"));if (authorization.length() != 0) {- if (! switchboard.userDB.hasAdminRight(authorization)){+ if (! switchboard.verifyAuthentication(header, true)){// force log-in (again, because wrong password was given)prop.put("AUTHENTICATE", "admin log-in");return prop;diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 343370584..c122ee1a4 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -1891,8 +1891,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (authorization.length() == 0) return 1; // no authentication information givenif ((((String) header.get("CLIENTIP", "")).equals("localhost")) && (adminAccountBase64MD5.equals(authorization))) return 3; // soft-authenticated for localhostif (adminAccountBase64MD5.equals(serverCodings.encodeMD5Hex(authorization))) return 4; // hard-authenticated, all ok- userDB.Entry entry = this.userDB.proxyAuth((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx"));- if((entry != null) && (entry.hasAdminRight()))+ if(userDB.hasAdminRight((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx")))return 4;return 0; // wrong password}