Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
passwordAuth
allob86d1085e2fa
diff --git a/source/de/anomic/data/userDB.java b/source/de/anomic/data/userDB.javaindex c96a0e245..aac7b211c 100644--- a/source/de/anomic/data/userDB.java+++ b/source/de/anomic/data/userDB.java@@ -162,7 +162,7 @@ public final class userDB {}catch(StringIndexOutOfBoundsException e){} //no valid Base64String[] tmp=auth.split(":");if(tmp.length == 2){- entry=this.getEntry(tmp[0]);+ /*entry=this.getEntry(tmp[0]);if( entry != null && entry.getMD5EncodedUserPwd().equals(serverCodings.encodeMD5Hex(auth)) ){if(entry.isLoggedOut()){try{@@ -171,13 +171,17 @@ public final class userDB {return null;}return entry;+ */+ entry=this.passwordAuth(tmp[0], tmp[1]);+ if(entry != null){+ //return entry;}else{ //wrong/no auth, so auth is removed from browser/*FIXME: This cannot worktry{entry.setProperty(Entry.LOGGED_OUT, "false");- }catch(IOException e){}- */+ }catch(IOException e){}*/}+ return entry;}return null;}@@ -212,6 +216,19 @@ public final class userDB {return null;}}+ public Entry passwordAuth(String user, String password){+ Entry entry=this.getEntry(user);+ if( entry != null && entry.getMD5EncodedUserPwd().equals(serverCodings.encodeMD5Hex(user+":"+password)) ){+ if(entry.isLoggedOut()){+ try{+ entry.setProperty(Entry.LOGGED_OUT, "false");+ }catch(IOException e){}+ return null;+ }+ }+ return entry;++ }public class Entry {public static final String MD5ENCODED_USERPWD_STRING = "MD5_user:pwd";