From f528229dc6067480fa5aba71d4ab176cdc3e5c42 Mon Sep 17 00:00:00 2001 From: MaxXor Date: Thu, 27 Aug 2015 23:09:25 +0200 Subject: [PATCH] Validate password before asking for save location --- Server/Forms/FrmBuilder.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Server/Forms/FrmBuilder.cs b/Server/Forms/FrmBuilder.cs index abd487c9..e73bc8e9 100644 --- a/Server/Forms/FrmBuilder.cs +++ b/Server/Forms/FrmBuilder.cs @@ -219,6 +219,14 @@ namespace xServer.Forms { string output = string.Empty; string icon = string.Empty; + string password = txtPassword.Text; + + if (password.Length < 3) + { + MessageBox.Show("Please enter a secure password with more than 3 characters.", + "Please enter a secure password", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } if (chkIconChange.Checked) { @@ -256,15 +264,6 @@ namespace xServer.Forms try { - string password = txtPassword.Text; - - if (password.Length < 3) - { - MessageBox.Show("Please enter a secure password with more than 3 characters.", - "Please enter a secure password", MessageBoxButtons.OK, MessageBoxIcon.Warning); - return; - } - string[] asmInfo = null; if (chkChangeAsmInfo.Checked) {