From 8f4259f1e3bb0859e9222d9005a6f6e640ccaf5e Mon Sep 17 00:00:00 2001 From: allo Date: Tue, 29 Nov 2005 21:31:06 +0000 Subject: [PATCH] md5Auth git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1144 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/data/userDB.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/data/userDB.java b/source/de/anomic/data/userDB.java index aac7b211c..99f20cafc 100644 --- a/source/de/anomic/data/userDB.java +++ b/source/de/anomic/data/userDB.java @@ -227,7 +227,18 @@ public final class userDB { } } return entry; - + } + public Entry md5Auth(String user, String md5){ + Entry entry=this.getEntry(user); + if( entry != null && entry.getMD5EncodedUserPwd().equals(md5)){ + if(entry.isLoggedOut()){ + try{ + entry.setProperty(Entry.LOGGED_OUT, "false"); + }catch(IOException e){} + return null; + } + } + return entry; } public class Entry {