-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[PR #8042/4b91b530 backport][3.9] Tightening the runtime type check for ssl (#7698) #8043
Merged
Dreamsorcerer
merged 4 commits into
3.9
from
patchback/backports/3.9/4b91b530e851acec62c7e9db4cf5c086bf153340/pr-8042
Jan 21, 2024
Merged
[PR #8042/4b91b530 backport][3.9] Tightening the runtime type check for ssl (#7698) #8043
Dreamsorcerer
merged 4 commits into
3.9
from
patchback/backports/3.9/4b91b530e851acec62c7e9db4cf5c086bf153340/pr-8042
Jan 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, the valid types of ssl parameter are SSLContext, Literal[False], Fingerprint or None. If user sets ssl = False, we disable ssl certificate validation which makes total sense. But if user set ssl = True by mistake, instead of enabling ssl certificate validation or raising errors, we silently disable the validation too which is a little subtle but weird. In this PR, we added a check that if user sets ssl=True, we enable certificate validation by treating it as using Default SSL Context. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sviatoslav Sydorenko <[email protected]> Co-authored-by: Sam Bull <[email protected]> Co-authored-by: J. Nick Koston <[email protected]> Co-authored-by: Sam Bull <[email protected]> (cherry picked from commit 9e14ea1) (cherry picked from commit 4b91b53)
5 tasks
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## 3.9 #8043 +/- ##
==========================================
- Coverage 97.39% 97.38% -0.01%
==========================================
Files 108 108
Lines 32496 32498 +2
Branches 3848 3849 +1
==========================================
Hits 31648 31648
- Misses 646 647 +1
- Partials 202 203 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Dreamsorcerer
deleted the
patchback/backports/3.9/4b91b530e851acec62c7e9db4cf5c086bf153340/pr-8042
branch
January 21, 2024 00:03
This was referenced Jan 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #8042 as merged into 3.10 (4b91b53).
Currently, the valid types of ssl parameter are SSLContext, Literal[False], Fingerprint or None.
If user sets ssl = False, we disable ssl certificate validation which makes total sense. But if user set ssl = True by mistake, instead of enabling ssl certificate validation or raising errors, we silently disable the validation too which is a little subtle but weird.
In this PR, we added a check that if user sets ssl=True, we enable certificate validation by treating it as using Default SSL Context.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko [email protected]
Co-authored-by: Sam Bull [email protected]
Co-authored-by: J. Nick Koston [email protected]
Co-authored-by: Sam Bull [email protected]
(cherry picked from commit 9e14ea1)
What do these changes do?
Are there changes in behavior for the user?
Related issue number
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.