diff --git a/ExternalConnectors/TSS/SecretServerInterface.cs b/ExternalConnectors/TSS/SecretServerInterface.cs index e43473ab2..7aba78d07 100644 --- a/ExternalConnectors/TSS/SecretServerInterface.cs +++ b/ExternalConnectors/TSS/SecretServerInterface.cs @@ -174,7 +174,7 @@ namespace ExternalConnectors.TSS DateTime ExpiresOn = SSConnectionData.ssTokenExpiresOn; - //Check if current token is valid + // Check if current token is valid if (!String.IsNullOrEmpty(Bearer)) { if (ExpiresOn >= DateTime.UtcNow) @@ -191,6 +191,8 @@ namespace ExternalConnectors.TSS var tokenResult = token.Access_token; SSConnectionData.ssTokenBearer = tokenResult; + SSConnectionData.ssTokenRefresh = token.Refresh_token; + SSConnectionData.ssTokenExpiresOn = token.Expires_on; return tokenResult; } } diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs index 63b672229..43ce5977d 100644 --- a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs +++ b/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs @@ -57,7 +57,7 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers if (versionAttribute != null) { var version = new Version(versionAttribute); - if (!(version == new Version(2, 7))) + if (!(version == new Version(2, 7)) && !(version == new Version(2, 83))) { throw new FileFormatException($"Unsupported file version ({version})."); } @@ -183,8 +183,8 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers { if (bool.TryParse(connectionSettingsNode.SelectSingleNode("./connectToConsole")?.InnerText, out var useConsole)) connectionInfo.UseConsoleSession = useConsole; - connectionInfo.RDPStartProgram = connectionSettingsNode.SelectSingleNode("./startProgram")?.InnerText; - connectionInfo.RDPStartProgramWorkDir = connectionSettingsNode.SelectSingleNode("./startProgramWorkDir")?.InnerText; + connectionInfo.RDPStartProgram = connectionSettingsNode.SelectSingleNode("./startProgram")?.InnerText ?? string.Empty; + connectionInfo.RDPStartProgramWorkDir = connectionSettingsNode.SelectSingleNode("./startProgramWorkDir")?.InnerText ?? string.Empty; if (int.TryParse(connectionSettingsNode.SelectSingleNode("./port")?.InnerText, out var port)) connectionInfo.Port = port; }