From 8e67bce559baec22fe780c7a608161d4b6c3b1f9 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 28 Jan 2008 19:35:12 +0000 Subject: [PATCH] Fix bug [ 1822782 ] login with empty password allowed when ldap active Implementing suggestion from stefan kuthan - stefan_kuthan --- base/src/org/compiere/util/Login.java | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/base/src/org/compiere/util/Login.java b/base/src/org/compiere/util/Login.java index fc25c49831..1151908850 100644 --- a/base/src/org/compiere/util/Login.java +++ b/base/src/org/compiere/util/Login.java @@ -229,19 +229,19 @@ public class Login if (system == null) throw new IllegalStateException("No System Info"); - if (system.isLDAP()) - { - authenticated = system.isLDAP(app_user, app_pwd); - if (authenticated) - app_pwd = null; - // if not authenticated, use AD_User as backup - } - else if (app_pwd == null || app_pwd.length() == 0) - { - log.warning("No Apps Password"); - return null; - } - + if (app_pwd == null || app_pwd.length() == 0) + { + log.warning("No Apps Password"); + return null; + } + if (system.isLDAP()) + { + authenticated = system.isLDAP(app_user, app_pwd); + if (authenticated) + app_pwd = null; + // if not authenticated, use AD_User as backup + } + KeyNamePair[] retValue = null; ArrayList list = new ArrayList(); //