diff --git a/ChangeLog b/ChangeLog index 81a0ca3c25..db5cd5e881 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ v1.12.x-snapshot =========== Bug fixes: - #6753 Fixed a number of vulnerabilities detected by static analysis +- #6760 Synergy loses license when creating a System scope config Enhancements: - #6750 Integrate SonarCloud for static analysis and test coverage diff --git a/src/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp index 029c326fc5..f62afe0dff 100644 --- a/src/gui/src/AppConfig.cpp +++ b/src/gui/src/AppConfig.cpp @@ -238,7 +238,6 @@ void AppConfig::loadSettings() m_ActivateEmail = loadSetting(kActivateEmail, "").toString(); m_CryptoEnabled = loadSetting(kCryptoEnabled, true).toBool(); m_AutoHide = loadSetting(kAutoHide, false).toBool(); - m_Serialkey = loadSetting(kSerialKey, "").toString().trimmed(); m_lastVersion = loadSetting(kLastVersion, "Unknown").toString(); m_LastExpiringWarningTime = loadSetting(kLastExpireWarningTime, 0).toInt(); m_ActivationHasRun = loadSetting(kActivationHasRun, false).toBool(); @@ -251,6 +250,16 @@ void AppConfig::loadSettings() m_ClientGroupChecked = loadSetting(kGroupClientCheck, true).toBool(); m_ServerHostname = loadSetting(kServerHostname).toString(); + //only change the serial key if the settings being loaded contains a key + bool updateSerial = GUI::Config::ConfigWriter::make() + ->hasSetting(settingName(kLoadSystemSettings),GUI::Config::ConfigWriter::kCurrent); + //if the setting exists and is not empty + updateSerial = updateSerial && !loadSetting(kSerialKey, "").toString().trimmed().isEmpty(); + + if (updateSerial) { + m_Serialkey = loadSetting(kSerialKey, "").toString().trimmed(); + } + //Set the default path of the TLS certificate file in the users DIR QString certificateFilename = QString("%1/%2/%3").arg(m_CoreInterface.getProfileDir(), "SSL",