Skip to content

Commit

Permalink
Use YAML.safe_load instead of YAML.load
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jan 22, 2017
1 parent 28ef083 commit 904273a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/blacklight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def self.blacklight_yml
end

begin
@blacklight_yml = YAML.load(blacklight_erb)
@blacklight_yml = YAML.safe_load(blacklight_erb)
rescue => e
raise("#{blacklight_config_file} was found, but could not be parsed.\n#{e.inspect}")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/railties/blacklight.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace :blacklight do
task :seed => [:environment] do
require 'yaml'

docs = YAML.load(File.open(File.join(Blacklight.root, 'solr', 'sample_solr_documents.yml')))
docs = YAML.safe_load(File.open(File.join(Blacklight.root, 'solr', 'sample_solr_documents.yml')))
conn = Blacklight.default_index.connection
conn.add docs
conn.commit
Expand Down

0 comments on commit 904273a

Please sign in to comment.