-
Notifications
You must be signed in to change notification settings - Fork 23.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
CVE-2021-3583 ensure we always have unsafe Co-authored-by: Rick Elrod <rick@elrod.me> (cherry picked from commit 4c8c40f)
- Loading branch information
Showing
4 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
security_fixes: | ||
- templating engine fix for not preserving usnafe status when trying to preserve newlines. CVE-2021-3583 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
- hosts: localhost | ||
gather_facts: false | ||
vars: | ||
nottemplated: this should not be seen | ||
imunsafe: !unsafe '{{ nottemplated }}' | ||
tasks: | ||
|
||
- set_fact: | ||
this_was_unsafe: > | ||
{{ imunsafe }} | ||
- set_fact: | ||
this_always_safe: '{{ imunsafe }}' | ||
|
||
- name: ensure nothing was templated | ||
assert: | ||
that: | ||
- this_always_safe == imunsafe | ||
- imunsafe == this_was_unsafe.strip() |