mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
fixed some more empty string deserialization bugs
This commit is contained in:
@@ -27,6 +27,7 @@ namespace mRemoteNG.Config.Serializers.CredentialSerializer
|
||||
|
||||
private string DecryptPasswords(string xml, SecureString key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(xml)) return xml;
|
||||
var xdoc = XDocument.Parse(xml);
|
||||
var cryptoProvider = new CryptoProviderFactoryFromXml(xdoc.Root).Build();
|
||||
foreach (var credentialElement in xdoc.Descendants())
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace mRemoteNG.Config.Serializers.CredentialSerializer
|
||||
|
||||
public IEnumerable<ICredentialRecord> Deserialize(string xml)
|
||||
{
|
||||
if (string.IsNullOrEmpty(xml)) return new ICredentialRecord[0];
|
||||
var xdoc = XDocument.Parse(xml);
|
||||
var rootElement = xdoc.Root;
|
||||
ValidateSchemaVersion(rootElement);
|
||||
|
||||
Reference in New Issue
Block a user