Fix tc-health-client to handle credentials files with special characters. #6933
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the tc-health-client does its own parsing of the credentials file, and doesn't correctly parse variables with special characters like
in them.
=
andThis 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?
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?
PR submission checklist
[x] This PR has documentationno docs, no interface change