From e00358ebab234d5b4b02b2468b2310aadcbb5572 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sun, 20 May 2007 07:41:38 +0000 Subject: [PATCH] Bug fix [ 1722058 ] Server Management doesn't decrypt password --- base/src/org/compiere/model/MUser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/src/org/compiere/model/MUser.java b/base/src/org/compiere/model/MUser.java index c5f1af43b9..60def21224 100644 --- a/base/src/org/compiere/model/MUser.java +++ b/base/src/org/compiere/model/MUser.java @@ -169,14 +169,15 @@ public class MUser extends X_AD_User MUser retValue = null; String sql = "SELECT * FROM AD_User " - + "WHERE Name=? AND Password=? AND IsActive='Y' AND AD_Client_ID=?"; + + "WHERE Name=? AND (Password=? OR Password=?) AND IsActive='Y' AND AD_Client_ID=?"; PreparedStatement pstmt = null; try { pstmt = DB.prepareStatement (sql, null); pstmt.setString (1, name); pstmt.setString (2, password); - pstmt.setInt(3, AD_Client_ID); + pstmt.setString(3, SecureEngine.encrypt(password)); + pstmt.setInt(4, AD_Client_ID); ResultSet rs = pstmt.executeQuery (); if (rs.next ()) {