summaryrefslogtreecommitdiff
path: root/lib/chef/whitelist.rb
diff options
context:
space:
mode:
authorPhil Dibowitz <phil@ipom.com>2014-12-10 18:13:48 -0800
committerPhil Dibowitz <phil@ipom.com>2014-12-10 18:13:48 -0800
commit49aa91c6591f8ee287f702db23643caf49dbd936 (patch)
tree4782fe42983466e22243818f1fbaffb31b2867d4 /lib/chef/whitelist.rb
parent01c7e4dc402c3252a96ba05680747fe773b78f39 (diff)
downloadchef-49aa91c6591f8ee287f702db23643caf49dbd936.tar.gz
Fix attribute whitelisting
False-y values are still there.
Diffstat (limited to 'lib/chef/whitelist.rb')
-rw-r--r--lib/chef/whitelist.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/whitelist.rb b/lib/chef/whitelist.rb
index ad52215f11..86c229d22c 100644
--- a/lib/chef/whitelist.rb
+++ b/lib/chef/whitelist.rb
@@ -57,7 +57,9 @@ class Chef
all_data = all_data[part]
end
- unless all_data[parts[-1]]
+ # Note: You can't do all_data[parts[-1]] here because the value
+ # may be false-y
+ unless all_data.key?(parts[-1])
Chef::Log.warn("Could not find whitelist attribute #{item}.")
return nil
end