Skip to content

Commit

Permalink
Fixed security issue with download 3rd party plugin (alshedivat#2364)
Browse files Browse the repository at this point in the history
Signed-off-by: George Araujo <[email protected]>
  • Loading branch information
george-gca authored Apr 23, 2024
1 parent 0aa3821 commit b315315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _plugins/download-3rd-party.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def download_fonts(url, dest)
unless File.directory?(dest) && !Dir.empty?(dest)
puts "Downloading fonts from #{url} to #{dest}"
# get available fonts from the url
doc = Nokogiri::HTML(URI.open(url, "User-Agent" => "Ruby/#{RUBY_VERSION}"))
doc = Nokogiri::HTML(URI().open(url, "User-Agent" => "Ruby/#{RUBY_VERSION}"))
doc.css('a').each do |link|
# get the file name from the url
file_name = link['href'].split('/').last.split('?').first
Expand Down

0 comments on commit b315315

Please sign in to comment.