Fix authentication failure after LHM restart caused by double-encoding of stored web-server password. (#2390)
Allow closing of AuthForm via OK without always resetting the existing password. Co-authored-by: Tobias Jüttner <tjuettner@nepatec.de>
This commit is contained in:
@@ -33,7 +33,10 @@ public partial class AuthForm : Form
|
||||
private void HttpAuthOkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
_parent.Server.UserName = httpAuthUsernameTextBox.Text;
|
||||
_parent.Server.Password = httpAuthPasswordTextBox.Text;
|
||||
if (!string.IsNullOrWhiteSpace(httpAuthPasswordTextBox.Text))
|
||||
{
|
||||
_parent.Server.SetPassword(httpAuthPasswordTextBox.Text);
|
||||
}
|
||||
_parent.Server.AuthEnabled = enableHTTPAuthCheckBox.Checked;
|
||||
_parent.AuthWebServerMenuItemChecked = _parent.Server.AuthEnabled;
|
||||
Close();
|
||||
@@ -43,4 +46,4 @@ public partial class AuthForm : Form
|
||||
{
|
||||
httpAuthUsernameTextBox.Enabled = httpAuthPasswordTextBox.Enabled = enableHTTPAuthCheckBox.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -964,7 +964,7 @@ public sealed partial class MainForm : Form
|
||||
_settings.SetValue("listenerPort", Server.ListenerPort);
|
||||
_settings.SetValue("authenticationEnabled", Server.AuthEnabled);
|
||||
_settings.SetValue("authenticationUserName", Server.UserName);
|
||||
_settings.SetValue("authenticationPassword", Server.Password);
|
||||
_settings.SetValue("authenticationPassword", Server.PasswordSHA256);
|
||||
|
||||
string fileName = Path.ChangeExtension(Application.ExecutablePath, ".config");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user