Browse Source

use HTTPS when connecting to Debian BTS

master
Sandro Tosi 7 years ago
parent
commit
655f7d110a
  1. 4
      debian/changelog
  2. 2
      reportbug/debbugs.py
  3. 4
      reportbug/ui/text_ui.py
  4. 14
      test/test_debbugs.py
  5. 2
      test/test_urlutils.py

4
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@debian.org> Mon, 13 Apr 2015 12:38:41 +0100
-- Sandro Tosi <morph@debian.org> Mon, 13 Apr 2015 12:54:49 +0100
reportbug (6.6.3) unstable; urgency=medium

2
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' :

4
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':

14
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')

2
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)

Loading…
Cancel
Save