mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge branch 'develop' into 254_component_check_issues
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
1.75 Beta 2 (2016-xx-xx):
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#260: Crash when attempting to load fully encrypted confCons v2.5
|
||||
#261: Double clicking folder in treeview doesnt expand it in 1.75 beta1
|
||||
|
||||
|
||||
1.75 Beta 1 (2016-11-15):
|
||||
|
||||
General Changes:
|
||||
|
||||
@@ -18,10 +18,7 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
|
||||
public void Setup(string confCons, string password)
|
||||
{
|
||||
_xmlConnectionsDeserializer = new XmlConnectionsDeserializer(confCons)
|
||||
{
|
||||
AuthenticationRequestor = password.ConvertToSecureString
|
||||
};
|
||||
_xmlConnectionsDeserializer = new XmlConnectionsDeserializer(confCons, password.ConvertToSecureString);
|
||||
_connectionTreeModel = _xmlConnectionsDeserializer.Deserialize();
|
||||
}
|
||||
|
||||
@@ -126,6 +123,8 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
get
|
||||
{
|
||||
yield return new TestCaseData(new Datagram("confCons v2.5", Resources.confCons_v2_5, "mR3m"));
|
||||
yield return new TestCaseData(new Datagram("confCons v2.5 fullencryption", Resources.confCons_v2_5_fullencryption, "mR3m"));
|
||||
yield return new TestCaseData(new Datagram("confCons v2.5 custompassword,fullencryption", Resources.confCons_v2_5_passwordis_Password_fullencryption, "Password"));
|
||||
yield return new TestCaseData(new Datagram("confCons v2.6", Resources.confCons_v2_6, "mR3m"));
|
||||
yield return new TestCaseData(new Datagram("confCons v2.6 5k Iterations", Resources.confCons_v2_6_5k_iterations, "mR3m"));
|
||||
yield return new TestCaseData(new Datagram("confCons v2.6 fullencryption", Resources.confCons_v2_6_fullencryption, "mR3m"));
|
||||
|
||||
28
mRemoteNGTests/Properties/Resources.Designer.cs
generated
28
mRemoteNGTests/Properties/Resources.Designer.cs
generated
@@ -71,9 +71,27 @@ namespace mRemoteNGTests.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to qqv8WEdruAEzSfdnPZMQ8w5cLhsl55V/Vu6h81Ucv7s7OT3vwnocgLmfId8rxpfVBnZwdn1Pdvea0XgwnQKJV5qdrVZEiy694Vv84B3wXjxU1wT72rWu1C5TNLhNEZp9JqjjAxOttIbOFL5X0dM+zI4YrCmTZI2Qt04TaC47MTr2niO7XvQSvjDeZRPnzeHsEiJvxHvBSm9yJ64Iupect0zKIpFPiDuOoHDhFQegUCZ26IdZCX2IHb3pH866rYV+yiAGhqt7pokBHUKURVtN6eKpbYzlDyGPbLRJf/eD13KnlaVC6sbf7YiCP3JwJrkN5mLdnrZbmZGQJG3Sn9rrGeShItYG/vvayFAQ5jxz1Wddixik/1frJOtUCaKW1svh8X9EvJo/RaBwgbTLIWth/WTgT4E+9DAVocdgMDGXrpsulnLTkX8doxeWHmBq2vAOhlYFNlhw2ZL3Yp/fbuVK9OMt7PbGkf3x3nThSf0R61Ip4NRjCzWempepEHoLMeiv [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_5_fullencryption {
|
||||
get {
|
||||
return ResourceManager.GetString("confCons_v2_5_fullencryption", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to cpfCUuZuIpTYihGooKKG5eRIZVB8P4bANitHVY57yrzyr9wf6lHlgUKx3Y3/YDYXDeS9uawycgbGSVOCnKmah3zEJ31V3BMlA809AdgQoYV9GFXLhgz8auO0mdcfYo2FP7UYS/I2bAfoNOaLvvgmqamm7Lu5FtvSvqdCf3PmpJAW042BijgkDhqritfDAyBvqUbNtE7yvrJohiSv5Ur7qFMXMIUCK0Fc4o3PXM++exN9XfTrtPAwQpjchxoEEmXBOQVnPB4QIn6eg6Wr/4XgtWYFIbtCCzyA5/L91CsDdKBZZktNSRrJTyMmPYGLn1k3Ted77rsoVUovrhxqfXgErPxDLBFAOA9wAjk7NscTRQJGxbgEU5H514g4U6h9wWlLaFyswQQCIskAbmoBrFJz72X9ooS4IVh1q9gLvCKuqb1VM6tNC0RCcLS5EHpxG6kIVpmnNtSa/0EvwaiSLMskC74TpYJ6nBUpfZT783jTikAFNDVI4eA43mJLEIBvrxBR [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_5_passwordis_Password_fullencryption {
|
||||
get {
|
||||
return ResourceManager.GetString("confCons_v2_5_passwordis_Password_fullencryption", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="False" Protected="Bqmajt4G5RDLsV5nn3s7QHZkkeWXQqgSDA4RSA8fWYx1bxRaorsmZ0ub4Z6mOBbefuXBbaWnsVRn0+NOJ3zTjkUJ" ConfVersion="2.6">
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="False" Protected="8LmIO3+MWBY0zTmfjfOEdCGxhTAwnlohb1veTGNZFt6lAYvY2UOzWyjVzkx6V93smpbP0ZOuexN15u7rvwJEjawC" ConfVersion="2.6">
|
||||
/// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" Connec [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_6 {
|
||||
@@ -84,7 +102,7 @@ namespace mRemoteNGTests.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="5000" FullFileEncryption="False" Protected="ZrxA5XJSUirgITMc2UxVRY4mLPxzNsyaqpgJXNdjcUdTlA/p4ZQP4bKqp44ZMrZlNU9jZgsvodGEVqS5/26St+Sk" ConfVersion="2.6">
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="5000" FullFileEncryption="False" Protected="Z1IOT8h7neJ5V7es5Iv63A2WsDG6QWl10F/Rb9ljKxvCseEITty1BfMNgiaVPfm7w61uabQKqu2waDCXUpLo1OZW" ConfVersion="2.6">
|
||||
/// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" Connec [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_6_5k_iterations {
|
||||
@@ -95,7 +113,7 @@ namespace mRemoteNGTests.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="True" Protected="tfNq70KLL8id4QnOeC9OrjMlACoArKa7pFJKcG1vrrRxMkvHpJPiEx/JlbPBJ3x4HXXx806ipsFiMkU1+OT7eE3Z" ConfVersion="2.6">NAxOa6dYlXPZCtpxWfiFrINjIC0dicQU7YdmKRnOn6POI07mMWU/Yy5uhPeXfVfzWgbPlKGyOMk5pgTw0pYIpTZpmqRKzZN+MzFw7NTW9QgD3Uhq528OItO2/MdpGQZ8AYM+qrDHHCXG9bGkczDwe5BZ8cDnGfbFrYTINGBZ9wxjLfyA9oYxzfrzoHDACbM8gD8wvmO26ML/lShwQS+/9B [rest of string was truncated]";.
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="True" Protected="qrOUhRlBLCnjjmfU1r8uwhgIBwZ+D1+trBgPmcQyEnW0xf2adLeOfUhZHnto2NOsMneXDibsS8PH0B1moOyvua22" ConfVersion="2.6">pCvan5X5+bSJy8oZq3QhrYs9zAS4v2tu9/4eYk4GAeB2EDep9Ed1zkshaLP165sWHE9oJ6bHnWSrSr/XXiDGdosvxl+O3hSSi02On9/TspuHhPDuuDb7UY2+mLh/LVoJqAjz2NmK7f3QkID2aanHkHzE/MDFiez8gLU8SdW9RxlSXT+L8MEjIXnq34yDVsfV89tGoP01T84ShTCZpRAQMq [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_6_fullencryption {
|
||||
get {
|
||||
@@ -105,7 +123,7 @@ namespace mRemoteNGTests.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="False" Protected="et1WJ5jh501ty5nzV139lFcoK4Cjm2HwYiFDgEtTTW6iIMTiJ7ilw0gkDOOahwig8neVelBnGaP1AAmRY4B6" ConfVersion="2.6">
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="False" Protected="e/T6ajrPtNNlHreSeD4QBqToTuiqtNACKiPJv7vU+l6TWCu9JNsmL+Y8lJ4aTl5YVcstXpQjxsZ9i8+YV4Gs" ConfVersion="2.6">
|
||||
/// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" ConnectToC [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_6_passwordis_Password {
|
||||
@@ -116,7 +134,7 @@ namespace mRemoteNGTests.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="True" Protected="RD3KGFlcH+4MxnYNje/ruXy6kN6pXgOwg8u6jlyU4u1RFWd8gm8DAGyAdycTDCr37dCNsi6F4Huj41haRQg4" ConfVersion="2.6">/au8q00e4YHoMGSnNWL/zRCzSQd1EaDgZ6VHuJ92iffxh5Spuhy86nsoiMr99UMaUF8UjlrYsboZC2B5sLO6t1lqKuB9okjY/jaLHTlGB7mmaHlDHXo7WEChz51xO+caUGfXCXPHgHOFsz/yCJIv3E9LwVOsAIH2qTfMp19OsytF3+Lb4T8v3nMAKb1iw63WcjFsp/835TMcZWWjI+SwPNKMze [rest of string was truncated]";.
|
||||
///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="True" Protected="d7pvbk1N6aswOmTgjCKkkavQKM2xTpknkdnMgzi+bOPgwr9WirGy82kaQldQ06af7MrZgJwvc9hKAcGxBfYt" ConfVersion="2.6">P9haenvGQ9HxnJSUUY+3SdALKoWQau0gF3Vxk6eCERKJ9G2gi87zhBcMCH+PwSsh/5ohPfOansFvUcDvPeE10slCTVqQmQFeU+daQY4OMk+2Q0UR/rEDRlbjGlM8YKVv2xjLRPRs6AbNJsKLv4zo8T/x3ySlZnuiMiGTGt4Wstfle/QfwNbBeV88N5IPbbKy2FWQf5yOlPtrjgPrcl0cRtRI3c [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string confCons_v2_6_passwordis_Password_fullencryption {
|
||||
get {
|
||||
|
||||
@@ -121,6 +121,12 @@
|
||||
<data name="confCons_v2_5" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\confCons_v2_5.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="confCons_v2_5_fullencryption" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\confCons_v2_5_fullencryption.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="confCons_v2_5_passwordis_Password_fullencryption" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\confCons_v2_5_passwordis_Password_fullencryption.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="confCons_v2_6" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\confCons_v2_6.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -201,6 +201,12 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\confCons_v2_6_5k-iterations.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\confCons_v2_5_fullencryption.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\confCons_v2_5_passwordis_Password_fullencryption.xml" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
||||
<ItemGroup>
|
||||
|
||||
@@ -30,10 +30,7 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
var dataProvider = new FileDataProvider(ConnectionFileName);
|
||||
var xmlString = dataProvider.Load();
|
||||
deserializer = new XmlConnectionsDeserializer(xmlString)
|
||||
{
|
||||
AuthenticationRequestor = PromptForPassword
|
||||
};
|
||||
deserializer = new XmlConnectionsDeserializer(xmlString, PromptForPassword);
|
||||
}
|
||||
|
||||
var connectionTreeModel = deserializer.Deserialize();
|
||||
|
||||
@@ -29,12 +29,13 @@ namespace mRemoteNG.Config.Serializers
|
||||
//TODO find way to inject data source info
|
||||
private string ConnectionFileName = "";
|
||||
private const double MaxSupportedConfVersion = 2.6;
|
||||
private RootNodeInfo _rootNodeInfo;
|
||||
private RootNodeInfo _rootNodeInfo = new RootNodeInfo(RootNodeType.Connection);
|
||||
|
||||
public Func<SecureString> AuthenticationRequestor { get; set; }
|
||||
|
||||
public XmlConnectionsDeserializer(string xml)
|
||||
public XmlConnectionsDeserializer(string xml, Func<SecureString> authenticationRequestor = null)
|
||||
{
|
||||
AuthenticationRequestor = authenticationRequestor;
|
||||
LoadXmlConnectionData(xml);
|
||||
ValidateConnectionFileVersion();
|
||||
}
|
||||
@@ -91,7 +92,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
Runtime.IsConnectionsFileLoaded = false;
|
||||
|
||||
var rootXmlElement = _xmlDocument.DocumentElement;
|
||||
_rootNodeInfo = InitializeRootNode(rootXmlElement);
|
||||
InitializeRootNode(rootXmlElement);
|
||||
CreateDecryptor(_rootNodeInfo, rootXmlElement);
|
||||
var connectionTreeModel = new ConnectionTreeModel();
|
||||
connectionTreeModel.AddRootNode(_rootNodeInfo);
|
||||
@@ -138,14 +139,10 @@ namespace mRemoteNG.Config.Serializers
|
||||
}
|
||||
}
|
||||
|
||||
private RootNodeInfo InitializeRootNode(XmlElement connectionsRootElement)
|
||||
private void InitializeRootNode(XmlElement connectionsRootElement)
|
||||
{
|
||||
var rootNodeName = connectionsRootElement?.Attributes["Name"].Value.Trim();
|
||||
var rootInfo = new RootNodeInfo(RootNodeType.Connection)
|
||||
{
|
||||
Name = rootNodeName
|
||||
};
|
||||
return rootInfo;
|
||||
_rootNodeInfo.Name = rootNodeName;
|
||||
}
|
||||
|
||||
private void CreateDecryptor(RootNodeInfo rootNodeInfo, XmlElement connectionsRootElement = null)
|
||||
|
||||
@@ -452,8 +452,13 @@ namespace mRemoteNG.UI.Window
|
||||
private void tvConnections_NodeMouseDoubleClick(object sender, CellClickEventArgs e)
|
||||
{
|
||||
if (e.ClickCount < 2) return;
|
||||
var clickedNodeAsContainer = e.Model as ContainerInfo;
|
||||
if (clickedNodeAsContainer != null)
|
||||
{
|
||||
olvConnections.ToggleExpansion(clickedNodeAsContainer);
|
||||
}
|
||||
|
||||
var clickedNode = e.Model as ConnectionInfo;
|
||||
|
||||
if (clickedNode?.GetTreeNodeType() == TreeNodeType.Connection |
|
||||
clickedNode?.GetTreeNodeType() == TreeNodeType.PuttySession)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user