Skip to content

Commit

Permalink
Ruby 3 - Replace YAML.load with YAML.safe_load
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxmea committed Feb 16, 2024
1 parent 2b9ca7d commit b622b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/functions/foreman/foreman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def foreman(item, search, per_page = "20", foreman_url = "https://localhost", fo
configfile = '/etc/foreman-proxy/settings.yml'
configfile = use_tfmproxy if use_tfmproxy.is_a? String
raise Puppet::ParseError, "File #{configfile} not found while use_tfmproxy is enabled" unless File.exist?(configfile)
tfmproxy = YAML.load(File.read(configfile))
tfmproxy = YAML.safe_load(File.read(configfile))
uri = URI.parse(tfmproxy[:foreman_url])
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
Expand Down

0 comments on commit b622b69

Please sign in to comment.