From c92f592459f30adba22d243d019ffc1498c87626 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Sun, 14 Jan 2018 21:07:50 +0100 Subject: Use HTTPS where available --- lib/bugzilla.rb | 2 +- lib/glsamaker/http.rb | 2 +- lib/glsamaker/portage.rb | 2 +- lib/tasks/import.rake | 4 ++-- public/xsl/guide.xsl | 58 ++++++++++++++++++++++++------------------------ 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/bugzilla.rb b/lib/bugzilla.rb index d9b8c44..dd4d714 100644 --- a/lib/bugzilla.rb +++ b/lib/bugzilla.rb @@ -183,7 +183,7 @@ module Bugzilla def xmlrpc_client client = XMLRPC::Client.new(GLSAMAKER_BUGZIE_HOST, '/xmlrpc.cgi', 443, nil, nil, nil, nil, true) - client.http_header_extra = {'User-Agent' => "GLSAMaker/#{GLSAMAKER_VERSION} (http://security.gentoo.org/)"} + client.http_header_extra = {'User-Agent' => "GLSAMaker/#{GLSAMAKER_VERSION} (https://security.gentoo.org/)"} token = '' token_file = File.join(Rails.root, 'tmp', 'bugzie-token.txt') diff --git a/lib/glsamaker/http.rb b/lib/glsamaker/http.rb index be48898..5f63096 100644 --- a/lib/glsamaker/http.rb +++ b/lib/glsamaker/http.rb @@ -24,7 +24,7 @@ module Glsamaker http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true if uri.scheme == "https" res = http.start { - http.request_get(uri.request_uri, {'User-Agent' => "GLSAMaker/#{GLSAMAKER_VERSION} (http://security.gentoo.org/)"}) + http.request_get(uri.request_uri, {'User-Agent' => "GLSAMaker/#{GLSAMAKER_VERSION} (https://security.gentoo.org/)"}) } # Raises an exception if HTTP status suggests something went wrong diff --git a/lib/glsamaker/portage.rb b/lib/glsamaker/portage.rb index bd9e6db..f49e93e 100644 --- a/lib/glsamaker/portage.rb +++ b/lib/glsamaker/portage.rb @@ -33,7 +33,7 @@ module Glsamaker def pgo(atom) raise(ArgumentError, "Invalid package atom") unless Portage.valid_atom?(atom) - n = Nokogiri::XML(Glsamaker::HTTP.get("http://packages.gentoo.org/package/#{atom}")) + n = Nokogiri::XML(Glsamaker::HTTP.get("https://packages.gentoo.org/package/#{atom}")) node = n.css('p.description').first.children.first if node.type == Nokogiri::XML::Node::TEXT_NODE diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index 0c120ce..ec34f91 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -113,8 +113,8 @@ namespace :import do glsa_list.push glsa.glsa_id end - GLSA_URL = "http://www.gentoo.org/rdf/en/glsa-index.rdf" - GLSA_URL_BASE = "http://www.gentoo.org/security/en/glsa/glsa-%s.xml?passthru=1" + GLSA_URL = "https://www.gentoo.org/rdf/en/glsa-index.rdf" + GLSA_URL_BASE = "https://www.gentoo.org/security/en/glsa/glsa-%s.xml?passthru=1" default_user = User.first if default_user == nil diff --git a/public/xsl/guide.xsl b/public/xsl/guide.xsl index b23e64f..3264274 100644 --- a/public/xsl/guide.xsl +++ b/public/xsl/guide.xsl @@ -126,7 +126,7 @@ -
+ : - - + + - +
-- cgit v1.2.3-65-gdbad