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

Fix tc-health-client to handle credentials files with special characters. #6933

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

rob05c
Copy link
Member

@rob05c rob05c commented Jun 28, 2022

Currently, the tc-health-client does its own parsing of the credentials file, and doesn't correctly parse variables with special characters like = and in them.

This fixes it to use sh to do the parsing, and return the result of declared variables. This will make it handle all special characters, comments, etc exactly like sh/bash, and should prevent any future issues with parsing.

Fixes #6931

Which Traffic Control components are affected by this PR?

  • Traffic Control Health Client (tc-health-client)

What is the best way to verify this PR?

Run tc-health-client with a credentials file with or = in the user, password, or URL variables, verify it works correctly.

If this is a bugfix, which Traffic Control versions contained the bug?

  • 6.1.x (but the Health Client is considered experimental)

PR submission checklist

@rob05c rob05c added bug something isn't working as intended tc-health-client Traffic Control Health Client labels Jun 28, 2022
Copy link
Contributor

@jpappa200 jpappa200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@rawlinp rawlinp merged commit 06a327a into apache:master Jun 28, 2022
zrhoffman pushed a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended tc-health-client Traffic Control Health Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tc-health-client cannot parse credential file when password contains equals sign
3 participants