Fix: Open password gen dialog will modify max connection

This commit is contained in:
yuanyuanxiang
2025-11-22 19:10:34 +08:00
parent e602a8a235
commit 9d382fb8c8
2 changed files with 3 additions and 1 deletions

View File

@@ -2688,7 +2688,8 @@ void CMy2015RemoteDlg::OnToolAuth()
dlg.m_sUserPwd = m_superPass.c_str(); dlg.m_sUserPwd = m_superPass.c_str();
dlg.DoModal(); dlg.DoModal();
if (!dlg.m_sUserPwd.IsEmpty()) {
if (!dlg.m_sUserPwd.IsEmpty() && !dlg.m_sPassword.IsEmpty()) {
m_superPass = dlg.m_sUserPwd; m_superPass = dlg.m_sUserPwd;
if (deviceID.c_str() == dlg.m_sDeviceID) { if (deviceID.c_str() == dlg.m_sDeviceID) {
m_nMaxConnection = dlg.m_nHostNum; m_nMaxConnection = dlg.m_nHostNum;

View File

@@ -194,6 +194,7 @@ void CPwdGenDlg::OnBnClickedButtonGenkey()
std::string finalKey = deriveKey(password, m_sDeviceID.GetString()); std::string finalKey = deriveKey(password, m_sDeviceID.GetString());
std::string fixedKey = strBeginDate.GetString() + std::string("-") + strEndDate.GetBuffer() + std::string("-") + hostNum.GetString() + "-" + std::string fixedKey = strBeginDate.GetString() + std::string("-") + strEndDate.GetBuffer() + std::string("-") + hostNum.GetString() + "-" +
getFixedLengthID(finalKey); getFixedLengthID(finalKey);
m_sPassword = fixedKey.c_str();
m_EditPassword.SetWindowTextA(fixedKey.c_str()); m_EditPassword.SetWindowTextA(fixedKey.c_str());
std::string hardwareID = getHardwareID(); std::string hardwareID = getHardwareID();
std::string hashedID = hashSHA256(hardwareID); std::string hashedID = hashSHA256(hardwareID);