forked from External/mage
Add some password validation.
This commit is contained in:
parent
8dd1e21dba
commit
f99660a451
6 changed files with 50 additions and 19 deletions
|
|
@ -346,10 +346,7 @@ public class ConnectDialog extends MageDialog {
|
|||
JOptionPane.showMessageDialog(rootPane, "Please provide a user name");
|
||||
return;
|
||||
}
|
||||
if (txtPassword.getText().isEmpty()) {
|
||||
JOptionPane.showMessageDialog(rootPane, "Please provide a password");
|
||||
return;
|
||||
}
|
||||
// txtPassword is not checked here, because authentication might be disabled by the server config.
|
||||
if (Integer.valueOf(txtPort.getText()) < 1 || Integer.valueOf(txtPort.getText()) > 65535) {
|
||||
JOptionPane.showMessageDialog(rootPane, "Invalid port number");
|
||||
txtPort.setText(MageFrame.getPreferences().get("serverPort", Integer.toString(Config.port)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue