summaryrefslogtreecommitdiff
path: root/lib/chef/http
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-09-19 11:45:54 -0700
committerClaire McQuin <claire@getchef.com>2014-09-22 11:22:29 -0700
commit8d4b04c2e12a728232269602be51aeda03ef497b (patch)
treeabab4b8723eccc4fdd1f4ea74f4e81416471bed9 /lib/chef/http
parent46a0a539ab1800942a3d3d6f2a73ca251f5d4a16 (diff)
downloadchef-8d4b04c2e12a728232269602be51aeda03ef497b.tar.gz
Escape path for globbing.
Diffstat (limited to 'lib/chef/http')
-rw-r--r--lib/chef/http/ssl_policies.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/http/ssl_policies.rb b/lib/chef/http/ssl_policies.rb
index f2a9c5b845..9c180c154e 100644
--- a/lib/chef/http/ssl_policies.rb
+++ b/lib/chef/http/ssl_policies.rb
@@ -22,6 +22,7 @@
#
require 'openssl'
+require 'chef/util/path_helper'
class Chef
class HTTP
@@ -76,7 +77,7 @@ class Chef
http_client.cert_store.set_default_paths
end
if config.trusted_certs_dir
- certs = Dir.glob(File.join(config.trusted_certs_dir, "*.{crt,pem}"))
+ certs = Dir.glob(File.join(Chef::Util::PathHelper.escape_glob(config.trusted_certs_dir), "*.{crt,pem}"))
certs.each do |cert_file|
cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
add_trusted_cert(cert)