ansible/CVE-2020-10729.patch
starlet-dx c52b423a72 fix CVE-2019-14904 CVE-2020-10684 CVE-2020-10729 CVE-2020-1735-to-CVE-2020-1740 CVE-2020-1753 CVE-2021-20191
(cherry picked from commit ebf023f03ad09762c8147ad8c963a51b60de62ff)
2021-09-17 20:38:23 +08:00

23 lines
1.0 KiB
Diff

From fdea9d251516ad09d2f5eef9a11a6e622355db7c Mon Sep 17 00:00:00 2001
From: Felix Fontein <felix@fontein.de>
Date: Fri, 14 Feb 2020 18:21:14 +0100
Subject: [PATCH] Make sure only one variable results are cached.
---
lib/ansible/template/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py
index 7cea02bc77187..b4e8118a4dd12 100644
--- a/lib/ansible/template/__init__.py
+++ b/lib/ansible/template/__init__.py
@@ -498,7 +498,7 @@ def template(self, variable, convert_bare=False, preserve_trailing_newlines=True
# we only cache in the case where we have a single variable
# name, to make sure we're not putting things which may otherwise
# be dynamic in the cache (filters, lookups, etc.)
- if cache:
+ if cache and only_one:
self._cached_result[sha1_hash] = result
return result