From 49810e0e55d9810736ba5023f4ceb84c191f4f1c Mon Sep 17 00:00:00 2001 From: Brad Koby Date: Tue, 21 Sep 2021 08:50:20 -0400 Subject: [PATCH] Allow Symbol and Sensitive types in YAML.safe_load --- lib/puppet/functions/extlib/cache_data.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/functions/extlib/cache_data.rb b/lib/puppet/functions/extlib/cache_data.rb index 08f98dc..7ff67b9 100644 --- a/lib/puppet/functions/extlib/cache_data.rb +++ b/lib/puppet/functions/extlib/cache_data.rb @@ -34,7 +34,7 @@ def cache_data(namespace, name, initial_data) cache = File.join(cache_dir, name) if File.exist? cache - YAML.safe_load(File.read(cache)) + YAML.safe_load(File.read(cache), [Symbol, Puppet::Pops::Types::PSensitiveType::Sensitive]) else FileUtils.mkdir_p(cache_dir) File.open(cache, 'w', 0o600) do |c|