From 9d382fb8c822906a3a0d7c69657e613d2e772996 Mon Sep 17 00:00:00 2001 From: yuanyuanxiang <962914132@qq.com> Date: Sat, 22 Nov 2025 19:10:34 +0800 Subject: [PATCH] Fix: Open password gen dialog will modify max connection --- server/2015Remote/2015RemoteDlg.cpp | 3 ++- server/2015Remote/CPasswordDlg.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/2015Remote/2015RemoteDlg.cpp b/server/2015Remote/2015RemoteDlg.cpp index 349bac7..a9b5683 100644 --- a/server/2015Remote/2015RemoteDlg.cpp +++ b/server/2015Remote/2015RemoteDlg.cpp @@ -2688,7 +2688,8 @@ void CMy2015RemoteDlg::OnToolAuth() dlg.m_sUserPwd = m_superPass.c_str(); dlg.DoModal(); - if (!dlg.m_sUserPwd.IsEmpty()) { + + if (!dlg.m_sUserPwd.IsEmpty() && !dlg.m_sPassword.IsEmpty()) { m_superPass = dlg.m_sUserPwd; if (deviceID.c_str() == dlg.m_sDeviceID) { m_nMaxConnection = dlg.m_nHostNum; diff --git a/server/2015Remote/CPasswordDlg.cpp b/server/2015Remote/CPasswordDlg.cpp index e80391d..c6588ad 100644 --- a/server/2015Remote/CPasswordDlg.cpp +++ b/server/2015Remote/CPasswordDlg.cpp @@ -194,6 +194,7 @@ void CPwdGenDlg::OnBnClickedButtonGenkey() std::string finalKey = deriveKey(password, m_sDeviceID.GetString()); std::string fixedKey = strBeginDate.GetString() + std::string("-") + strEndDate.GetBuffer() + std::string("-") + hostNum.GetString() + "-" + getFixedLengthID(finalKey); + m_sPassword = fixedKey.c_str(); m_EditPassword.SetWindowTextA(fixedKey.c_str()); std::string hardwareID = getHardwareID(); std::string hashedID = hashSHA256(hardwareID);