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

Validate the var names before substitution #291

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Conversation

stefanprodan
Copy link
Member

The name of a variable used in post build substitutions can contain only alphanumeric and underscore characters. This PR implements validation for the variable names using ^[_[:alpha:]][_[:alpha:][:digit:]]*$ regex.

Fix: #290

@stefanprodan stefanprodan added enhancement New feature or request area/varsub Post-build variable substitution related issues and pull requests labels Feb 27, 2021
@stefanprodan stefanprodan changed the title Validation the var names before substitution Validate the var names before substitution Feb 27, 2021
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @stefanprodan 💯

@stefanprodan stefanprodan merged commit ff38a3f into main Mar 2, 2021
@stefanprodan stefanprodan deleted the var-validation branch March 2, 2021 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/varsub Post-build variable substitution related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variable substitution failed: missing closing brace when using variable substitution in Kustomization
2 participants