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

Percent symbols cause an issue if there is more than one present in the retrieved secret #6

Open
LvledPanic opened this issue Dec 11, 2024 · 0 comments

Comments

@LvledPanic
Copy link

LvledPanic commented Dec 11, 2024

Steps to Repeat:

  1. Add a test password record in Keeper and set the password to abc"def'ghi$jkl%mno%pqr`stu.
  2. Add an environment parameter to a TeamCity Build Configuration %keeper://<uid>/field/password% as the value
name: env.TestCred
value: %keeper://<uid>/field/password%
type: Password
  1. Output individual characters of that parameter to the log. I did this with a powershell build step that reads from the environment variable
$a = ${env:TestCred}
write-output ("$($a[0..100])")
  1. Review the contents of the log. Mine showed this (uid redacted)
% k e e p e r : / / <uid> / f i e l d / p a s s w o r d %

Expected Result

I should have seen the password I set in Keeper abc"def'ghi$jkl%mno%pqr`stu, but it did not resolve.

I have verified that if I remove one or both % symbols the password resolves successfully, so it is not an issue with the wrong UID or access.

Possible Solution

Escape the % characters after retrieving secrets from Keeper, but before assigning them to parameter values by replacing % with %%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant