Skip to content

Check rendered YAML for invalid keys - #33213

Merged
cachedout merged 2 commits into
saltstack:2015.8from
terminalmage:issue33073
May 13, 2016
Merged

cachedout merged 2 commits into
saltstack:2015.8from
terminalmage:issue33073

Conversation

@terminalmage

Copy link
Copy Markdown
Contributor

PyYAML will for some reason allow improper YAML, specifically double
curly-braces like {{ }}, to be formed into an unhashable dict (that
is, one with a dict as a key). This commit will change the YAML renderer
such that the rendered data is recursively checked for keys that are
dicts, and raises an SaltRenderError if such a key is encountered.

Resolves #33073.

PyYAML will for some reason allow improper YAML, specifically double
curly-braces like ``{{ }}``, to be formed into an unhashable dict (that
is, one with a dict as a key). This commit will change the YAML renderer
such that the rendered data is recursively checked for keys that are
dicts, and raises an SaltRenderError if such a key is encountered.

Resolves saltstack#33073.
@cachedout

Copy link
Copy Markdown
Contributor

@terminalmage Test suite caught something. Could you peek?

@terminalmage

Copy link
Copy Markdown
Contributor Author

Looking.

This test was using jinja placeholders but was not passing the template
through the jinja renderer. This commit adds the use of the jinja
renderer to this test to fix the failure caused by the addition of
verification of the loaded YAML inthe previous commit.
@cachedout
cachedout merged commit 855bed3 into saltstack:2015.8 May 13, 2016
@terminalmage
terminalmage deleted the issue33073 branch July 7, 2016 18:58
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

Successfully merging this pull request may close these issues.

2 participants