This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 7b21b502b704f04af0233f20673ac39e44540336 Author: Sebb <[email protected]> AuthorDate: Tue Sep 29 22:18:39 2020 +0100 Untaint unnecessary here --- lib/whimsy/public.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/whimsy/public.rb b/lib/whimsy/public.rb index 392cf82..87d0e55 100644 --- a/lib/whimsy/public.rb +++ b/lib/whimsy/public.rb @@ -3,7 +3,6 @@ # require 'json' -#require 'wunderbar' require 'net/https' require 'fileutils' @@ -14,14 +13,13 @@ module Public # contents of a given public file, read from local copy if possible, # fetched from the web otherwise def self.getfile(pubname) - local_copy = File.expand_path('../../../www/public/'+pubname, __FILE__.untaint).untaint + local_copy = File.expand_path('../../../www/public/' + pubname, __FILE__) if File.exist? local_copy -# Wunderbar.info "Using local copy of #{pubname}" File.read(local_copy) else -# Wunderbar.info "Fetching remote copy of #{pubname}" - response = Net::HTTP.get_response(URI(DATAURI+pubname)) + response = Net::HTTP.get_response(URI(DATAURI + pubname)) raise ArgumentError, "'#{pubname}' #{response.message}" unless response.is_a?(Net::HTTPSuccess) + response.body end end
