IDEMPIERE-2266 ZK7 - MSession.load: NO Data found for AD_Session_ID

This commit is contained in:
Carlos Ruiz 2016-03-22 22:47:34 +01:00
parent 18e494fd12
commit b716da12a9
1 changed files with 33 additions and 29 deletions

View File

@ -150,6 +150,9 @@ public class LoginPanel extends Window implements EventListener<Event>
try
{
int AD_Session_ID = Integer.parseInt(data[0]);
int cnt = DB.getSQLValueEx(null, "SELECT COUNT(*) FROM AD_Session WHERE AD_Session_ID=?", AD_Session_ID);
if (cnt == 1)
{
MSession session = new MSession(Env.getCtx(), AD_Session_ID, null);
if (session.get_ID() == AD_Session_ID)
{
@ -182,6 +185,7 @@ public class LoginPanel extends Window implements EventListener<Event>
}
}
}
}
} catch (Exception e) {
//safe to ignore
if (logger.isLoggable(Level.INFO))logger.log(Level.INFO, e.getLocalizedMessage(), e);
@ -567,7 +571,7 @@ public class LoginPanel extends Window implements EventListener<Event>
// IDEMPIERE-617
String x_Forward_IP = Executions.getCurrent().getHeader("X-Forwarded-For");
if (x_Forward_IP == null) {
x_Forward_IP = currSess.getRemoteAddr();
x_Forward_IP = Executions.getCurrent().getRemoteAddr();
}
logAuthFailure.log(x_Forward_IP, "/webui", userId, loginErrMsg);