Resolved bug with importing gateway password from RDCMan when not stored in clear text

This commit is contained in:
David Sparer
2016-09-25 11:11:06 -06:00
parent 63ae7d845c
commit 34f8a123a5

View File

@@ -152,19 +152,11 @@ namespace mRemoteNG.Config.Serializers
if (gatewaySettingsNode?.Attributes?["inherit"].Value == "None")
{
connectionInfo.RDGatewayUsageMethod = gatewaySettingsNode.SelectSingleNode("./enabled")?.InnerText == "True" ? ProtocolRDP.RDGatewayUsageMethod.Always : ProtocolRDP.RDGatewayUsageMethod.Never;
connectionInfo.RDGatewayHostname = gatewaySettingsNode.SelectSingleNode("./hostName")?.InnerText;
connectionInfo.RDGatewayUsername = gatewaySettingsNode.SelectSingleNode("./userName")?.InnerText;
var passwordNode = logonCredentialsNode.SelectSingleNode("./password");
if (passwordNode?.Attributes?["storeAsClearText"].Value == "True")
{
connectionInfo.RDGatewayPassword = passwordNode.InnerText;
}
else
{
connectionInfo.Password = DecryptPassword(passwordNode.InnerText);
}
var passwordNode = gatewaySettingsNode.SelectSingleNode("./password");
connectionInfo.RDGatewayPassword = passwordNode?.Attributes?["storeAsClearText"].Value == "True" ? passwordNode.InnerText : DecryptPassword(passwordNode?.InnerText);
connectionInfo.RDGatewayDomain = gatewaySettingsNode.SelectSingleNode("./domain")?.InnerText;
// ./logonMethod