fix return the wrong value
This commit is contained in:
@@ -22,12 +22,13 @@ namespace Pilz.Json.Converters
|
||||
var idString = serializer.Deserialize<string>(reader);
|
||||
SecureString id;
|
||||
|
||||
if (existingValue is object)
|
||||
if (existingValue is SecureString)
|
||||
{
|
||||
id = (SecureString)existingValue;
|
||||
id.EncryptedValue = idString;
|
||||
}
|
||||
else
|
||||
id = new SecureString();
|
||||
|
||||
id.EncryptedValue = idString;
|
||||
id = new SecureString(idString, true);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user