Skip to content

Commit

Permalink
SDn-connector: fix password...
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Jan 16, 2025
1 parent 6421a71 commit d83cded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PowerFGT/Public/cmdb/system/sdn-connector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ function Add-FGTSystemSDNConnector {
$_sdnconnector | add-member -name "username" -membertype NoteProperty -Value $username

if (("Desktop" -eq $PSVersionTable.PsEdition) -or ($null -eq $PSVersionTable.PsEdition)) {
$bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret);
$bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password);
$sec = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr);
$_sdnconnector | add-member -name "password" -membertype NoteProperty -Value $sec
}
else {
$sec = ConvertFrom-SecureString -SecureString $secret -AsPlainText
$sec = ConvertFrom-SecureString -SecureString $password -AsPlainText
$_sdnconnector | add-member -name "password" -membertype NoteProperty -Value $sec
}

Expand Down

0 comments on commit d83cded

Please sign in to comment.