Skip to content

Commit

Permalink
Use safe_load instead of load for yaml (#77)
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <[email protected]>
  • Loading branch information
VachaShah committed Jun 30, 2022
1 parent f1a0d40 commit aef0284
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opensearch/lib/opensearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def verify_open_search

body = if response.headers['content-type'] == 'application/yaml'
require 'yaml'
YAML.load(response.body)
YAML.safe_load(response.body)
else
response.body
end
Expand Down
2 changes: 1 addition & 1 deletion profile/benchmarking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module Benchmarking
def each_run(file)
if file
file = File.new(file)
matrix = YAML.load(ERB.new(file.read).result)
matrix = YAML.safe_load(ERB.new(file.read).result)
file.close

matrix.each_with_index do |run, i|
Expand Down

0 comments on commit aef0284

Please sign in to comment.