* [ adempiere-Bugs-1719617 ] Server bean allows remote unauthenticated queries

- Implemented jaas authentication for server bean
This commit is contained in:
Heng Sin Low 2007-05-25 06:40:20 +00:00
parent 6c59ed5784
commit c6b0478c14
1 changed files with 14 additions and 3 deletions

View File

@ -18,6 +18,7 @@ package org.compiere.apps;
import java.awt.*;
import java.awt.event.*;
import java.rmi.AccessException;
import java.sql.*;
import java.util.*;
import javax.swing.*;
@ -617,9 +618,19 @@ public final class ALogin extends CDialog
}
catch (Throwable e)
{
log.severe(CLogger.getRootCause(e).getLocalizedMessage());
statusBar.setStatusLine(CLogger.getRootCause(e).getLocalizedMessage(), true);
return false;
if (e.getCause() instanceof AccessException)
{
statusBar.setStatusLine(txt_UserPwdError, true);
userTextField.setBackground(AdempierePLAF.getFieldBackground_Error());
passwordField.setBackground(AdempierePLAF.getFieldBackground_Error());
return false;
}
else
{
log.severe(CLogger.getRootCause(e).getLocalizedMessage());
statusBar.setStatusLine(CLogger.getRootCause(e).getLocalizedMessage(), true);
return false;
}
}