diff --git a/src/Jagabata/Cmdlets/UserCommand.cs b/src/Jagabata/Cmdlets/UserCommand.cs index 9c8e932..faae167 100644 --- a/src/Jagabata/Cmdlets/UserCommand.cs +++ b/src/Jagabata/Cmdlets/UserCommand.cs @@ -3,7 +3,6 @@ using Jagabata.Cmdlets.Utilities; using Jagabata.Resources; using System.Management.Automation; -using System.Runtime.InteropServices; using System.Security; namespace Jagabata.Cmdlets @@ -327,7 +326,6 @@ public class UpdateUserCommand : UpdateCommandBase protected override Dictionary CreateSendData() { var sendData = new Dictionary(); - string dataDescription = string.Empty; if (!string.IsNullOrEmpty(UserName)) sendData.Add("username", UserName); if (FirstName is not null) @@ -342,14 +340,7 @@ public class UpdateUserCommand : UpdateCommandBase sendData.Add("is_system_auditor", IsSystemAuditor); if (Password is not null) { - var passwordString = Marshal.PtrToStringUni(Marshal.SecureStringToGlobalAllocUnicode(Password)); - Password.Dispose(); - if (!string.IsNullOrEmpty(passwordString)) - { - sendData.Add("password", "***"); // dummy - dataDescription = Json.Stringify(sendData, pretty: true); - sendData["password"] = passwordString; - } + sendData.Add("password", Password); } return sendData;