summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-01-14 21:07:50 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-01-14 21:07:50 +0100
commitc92f592459f30adba22d243d019ffc1498c87626 (patch)
tree389fb0057facb938d854af92c019cfda5a7c9134 /lib
parentVersion must be non-nil to check slot. (diff)
downloadglsamaker-c92f592459f30adba22d243d019ffc1498c87626.tar.gz
glsamaker-c92f592459f30adba22d243d019ffc1498c87626.tar.bz2
glsamaker-c92f592459f30adba22d243d019ffc1498c87626.zip
Use HTTPS where available
Diffstat (limited to 'lib')
-rw-r--r--lib/bugzilla.rb2
-rw-r--r--lib/glsamaker/http.rb2
-rw-r--r--lib/glsamaker/portage.rb2
-rw-r--r--lib/tasks/import.rake4
4 files changed, 5 insertions, 5 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