1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-11 13:29:19 +01:00

Merge branch 'fix_CVE-2013-3685' of https://github.com/lethliel/osc

Use custom https connection classes. Follow-up fix for commit
6ddf771c9f753cf052d9eb2965000021f8ecd26c ("[python3] make oscssl.py
python3 ready.").
This commit is contained in:
Marcus Huewe 2019-07-23 20:53:37 +02:00
commit 9daa15de8e

View File

@ -199,13 +199,13 @@ class myHTTPSHandler(M2Crypto.m2urllib2.HTTPSHandler):
if target_host != host: if target_host != host:
request_uri = urldefrag(full_url)[0] request_uri = urldefrag(full_url)[0]
h = httpslib.ProxyHTTPSConnection(host=host, ssl_context=self.ctx) h = myProxyHTTPSConnection(host=host, ssl_context=self.ctx)
else: else:
try: # up to python-3.2 try: # up to python-3.2
request_uri = req.get_selector() request_uri = req.get_selector()
except AttributeError: # from python-3.3 except AttributeError: # from python-3.3
request_uri = req.selector request_uri = req.selector
h = httpslib.HTTPSConnection(host=host, ssl_context=self.ctx) h = myHTTPSConnection(host=host, ssl_context=self.ctx)
# End our change # End our change
h.set_debuglevel(self._debuglevel) h.set_debuglevel(self._debuglevel)