Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-TssSecretField returns field value with escaped quotes #336

Open
ChristophHannappel opened this issue May 25, 2023 · 1 comment
Open
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@ChristophHannappel
Copy link

ChristophHannappel commented May 25, 2023

Verified issue does not already exist?

Yes

What error did you receive

PS> Get-TssSecretField -TssSession $session -Id 123 -Slug password
\"ImAP@ssw0rd\"

Please run the command using -Verbose

Verbose: Command invocation: Get-TssSecretField -TssSession:TssSessionObject -Id:System.Int32[] -Slug:passwort -Verbose:True
Verbose: Performing the operation GET https://fqdn/api/v1/secrets/123/fields/passwort with:

\"ImAP@ssw0rd\"

Provide a test case or steps to reproduce

Create a Secret with a password which contains quotes
Example
"ImAP@ssw0rd"

Expected behavior

The return Value should not be escaped

What Edition of Secret Server?

Platinum

What version of Secret Server

11.0

What PowerShell host was used when producing this error

Windows PowerShell ISE (powershell_ise)

PowerShell Host Version

Name Value


PSVersion 5.1.19041.2673
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2673
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@ChristophHannappel ChristophHannappel added bug Something isn't working triage needed new issues that are still in state of triage labels May 25, 2023
@ChristophHannappel ChristophHannappel changed the title Get-TssSecretField returns field value enclosed with escaped quotes Get-TssSecretField returns field value with escaped quotes May 25, 2023
@gaurava-delinea
Copy link

The mentioned issue is reproduceable. I cross check it with the Postman and confirmed that Secret Server API also returns the double quotes enclosed password in same way. In sort secret Server API returning the escaped value. so not an issue with the PowerShell Module.
Actual password: "ImAP@ssw0rd"
resulted password: ""ImAP@ssw0rd""
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage needed new issues that are still in state of triage
Projects
None yet
Development

No branches or pull requests

2 participants