Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide misleading ssl security warning in python>=2.7.9 #875

Merged
merged 3 commits into from Oct 15, 2022
Merged

hide misleading ssl security warning in python>=2.7.9 #875

merged 3 commits into from Oct 15, 2022

Conversation

asottile-sentry
Copy link
Contributor

urllib2 (python >=2.7.9) and urllib.request (python>=3.2) do validate ssl

for example:

$ docker run --rm -ti python:2.7.8-slim python -c 'import urllib2; urllib2.urlopen("https://expired.badssl.com")'
$ docker run --rm -ti python:2.7.9-slim python -c 'import urllib2; urllib2.urlopen("https://expired.badssl.com")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/local/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/local/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/usr/local/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>

@CLAassistant
Copy link

CLAassistant commented Sep 15, 2022

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@richardm-stripe richardm-stripe enabled auto-merge (squash) October 15, 2022 00:31
@richardm-stripe richardm-stripe merged commit 291d569 into stripe:master Oct 15, 2022
@asottile-sentry asottile-sentry deleted the hide-misleading-warning branch October 17, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants