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

Control Character Escaping - ccp get-account #163

Open
strick-j opened this issue Aug 17, 2022 · 0 comments
Open

Control Character Escaping - ccp get-account #163

strick-j opened this issue Aug 17, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@strick-j
Copy link

strick-j commented Aug 17, 2022

Describe the bug
Credentials retrieved via the cybr-cli ccp capability are not escaped properly for use with common tools such as 'jq'. For example when a credential contains a backslash the response contains a single backslash and when you try to parse the response with jq you receive the following error:

echo $test | jq -r '.Content?' parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 5, column 5

If a response contains other special characters such as > the response is escaped properly and is returned as \u003e in place of the >.

cybr ccp get-account -b https://test.test.us -I ServiceTest -s TEST -o appacct-cybrtest { "Address": "STRLAB.US", "CPMStatus": "success", "Content": ":mh(s4lm*PXYqfM\u003e" }

To Reproduce
Steps to reproduce the behavior:

  1. Retrieve an account via CCP that contains a **
  2. Use jq to extract the account Content
  3. Error will be displayed

Expected behavior
Properly escape control characters when returning response from CCP. Some translation may be necessary from the response received from CyberArk.

Desktop:

  • OS: macOS 12.5 (Monterey)
@infamousjoeg infamousjoeg added enhancement New feature or request good first issue Good for newcomers labels Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants