[Reportbug-commits] [reportbug] 08/11: use HTTPS when connecting to Debian BTS

Sandro Tosi morph at moszumanska.debian.org
Wed Apr 15 18:08:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit 655f7d110a20e3e24122d96c80bfa2bf88290b30
Author: Sandro Tosi <morph at debian.org>
Date:   Mon Apr 13 12:55:56 2015 +0100

    use HTTPS when connecting to Debian BTS
---
 debian/changelog        |  4 +++-
 reportbug/debbugs.py    |  2 +-
 reportbug/ui/text_ui.py |  4 ++--
 test/test_debbugs.py    | 14 +++++++-------
 test/test_urlutils.py   |  2 +-
 5 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a973e80..6820fd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,8 +16,10 @@ reportbug (6.6.4) UNRELEASED; urgency=medium
   * bin/reportbug
     - suggest to contact Debian support channels when reporting bugs against
       generic packages; thanks to Tomas Pospisek for the patch; Closes: #661563
+  * reportbug/{debbugs.py, ui/text_ui.py}, test/test_{debbugs.py, urlutils.py}
+    - use HTTPS when connecting to Debian BTS
 
- -- Sandro Tosi <morph at debian.org>  Mon, 13 Apr 2015 12:38:41 +0100
+ -- Sandro Tosi <morph at debian.org>  Mon, 13 Apr 2015 12:54:49 +0100
 
 reportbug (6.6.3) unstable; urgency=medium
 
diff --git a/reportbug/debbugs.py b/reportbug/debbugs.py
index c93e655..d8bc63b 100644
--- a/reportbug/debbugs.py
+++ b/reportbug/debbugs.py
@@ -749,7 +749,7 @@ SYSTEMS = { 'debian' :
               'deppkgs' : ('gcc', 'g++', 'cpp', 'gcj', 'gpc', 'gobjc',
                            'chill', 'gij', 'g77', 'python', 'python-base',
                            'x-window-system-core', 'x-window-system'),
-              'cgiroot' : 'http://bugs.debian.org/cgi-bin/',
+              'cgiroot' : 'https://bugs.debian.org/cgi-bin/',
               'infofunc' : debian_infofunc,
               },
             'ubuntu' :
diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index 544a75f..c24ff72 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -672,7 +672,7 @@ def browse_bugs(hierarchy, count, bugs, bts, queryonly, mirrors,
                         lastpage = []
                         break
                     elif x == 'b':
-                        launch_browser('http://bugs.debian.org/%s' % package)
+                        launch_browser('https://bugs.debian.org/%s' % package)
                         continue
                     elif x == 'r':
                         continue
@@ -895,7 +895,7 @@ def search_bugs(hierarchyfull, bts, queryonly, mirrors,
                         lastpage = []
                         break
                     elif x == 'b':
-                        launch_browser('http://bugs.debian.org/%s' % package)
+                        launch_browser('https://bugs.debian.org/%s' % package)
                     elif x == 'r':
                         continue
                     elif x == 'q':
diff --git a/test/test_debbugs.py b/test/test_debbugs.py
index c3338aa..787adc6 100644
--- a/test/test_debbugs.py
+++ b/test/test_debbugs.py
@@ -130,7 +130,7 @@ class TestMiscFunctions(unittest2.TestCase):
         dictparse = re.compile(r'([^\s]+)\s+(.+)',re.IGNORECASE)
 
         bdo_list = {}
-        pseudo = urllib.urlopen('http://bugs.debian.org/pseudopackages/pseudo-packages.description')
+        pseudo = urllib.urlopen('https://bugs.debian.org/pseudopackages/pseudo-packages.description')
         for l in pseudo:
             m = dictparse.search(l)
             bdo_list[m.group(1)] = m.group(2)
@@ -171,33 +171,33 @@ class TestUrlFunctions(unittest2.TestCase):
     def test_cgi_report_url(self):
 
         self.assertEqual(debbugs.cgi_report_url('debian', 123),
-                         'http://bugs.debian.org/cgi-bin/bugreport.cgi?' +
+                         'https://bugs.debian.org/cgi-bin/bugreport.cgi?' +
                              'bug=123&archived=False&mbox=no')
         self.assertIsNone(debbugs.cgi_report_url('default', 123))
 
     def test_cgi_package_url(self):
 
         self.assertEqual(debbugs.cgi_package_url('debian', 'reportbug'),
-                         'http://bugs.debian.org/cgi-bin/pkgreport.cgi?' +
+                         'https://bugs.debian.org/cgi-bin/pkgreport.cgi?' +
                              'archived=no&pkg=reportbug&repeatmerged=yes')
         self.assertEqual(debbugs.cgi_package_url
                          ('debian', 'reportbug', source=True),
-                         'http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=' +
+                         'https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=' +
                              'reportbug&archived=no&repeatmerged=yes')
         self.assertEqual(debbugs.cgi_package_url
                          ('debian', 'reportbug', version='5.0'),
-                         'http://bugs.debian.org/cgi-bin/pkgreport.cgi?archi' +
+                         'https://bugs.debian.org/cgi-bin/pkgreport.cgi?archi' +
                          'ved=no&version=5.0&pkg=reportbug&repeatmerged=yes')
 
 
     def test_get_package_url(self):
 
         self.assertEqual(debbugs.get_package_url('debian', 'reportbug'),
-                         'http://bugs.debian.org/cgi-bin/pkgreport.cgi?archi' +
+                         'https://bugs.debian.org/cgi-bin/pkgreport.cgi?archi' +
                          'ved=no&pkg=reportbug&repeatmerged=yes')
 
     def test_get_report_url(self):
 
         self.assertEqual(debbugs.get_report_url('debian', 123),
-                         'http://bugs.debian.org/cgi-bin/bugreport.cgi?' +
+                         'https://bugs.debian.org/cgi-bin/bugreport.cgi?' +
                          'bug=123&archived=False&mbox=no')
diff --git a/test/test_urlutils.py b/test/test_urlutils.py
index 73ea469..ed13839 100644
--- a/test/test_urlutils.py
+++ b/test/test_urlutils.py
@@ -9,6 +9,6 @@ class TestNetwork(unittest2.TestCase):
     @attr('network') #mark the test as using network
     def test_open_url(self):
 
-        page = urlutils.open_url('http://bugs.debian.org/reportbug')
+        page = urlutils.open_url('https://bugs.debian.org/reportbug')
         content = page.read()
         self.assertIsNotNone(page.info().headers)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list