Skip to content

Revert caching a default SSLContext #6767

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

Merged
merged 2 commits into from
Jun 13, 2025

Conversation

nateprewitt
Copy link
Member

This PR reverts the changes from #6667 to the previous behavior. Due to the number of edge cases and concurrency issues we've encountered with this change, we've decided the benefit doesn't currently outweigh the pain to existing infrastructure. We've iterated on a few tries to keep this functionality in place, but are still receiving reports of novel issues with this behavior.

We may be able to revisit this in a later version of Requests but we'll need a much more comprehensive test plan.

@nateprewitt nateprewitt force-pushed the remove_cached_sslcontext branch from ce40c46 to d520f46 Compare July 18, 2024 18:01
@stianjensen
Copy link

Is this still planned to be reverted?

@Conobi
Copy link

Conobi commented Jun 2, 2025

I would also suggest to revert it ASAP.
This unsafe caching can make some applications vulnerable to DOS attack when using mTLS authentication, causing Python to crash.
In its current version, requests cannot be used safely in mTLS scenarios.

@dkliban
Copy link

dkliban commented Jun 13, 2025

@sigmavirus24 I applied this PR as a patch to my server and it stopped the core dumps i was experiencing. When is this going to be merged and released?

@nateprewitt
Copy link
Member Author

@dkliban It should go out with the next release. We'll update once we have a clearer timeline, we'll see what we can do next week.

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.

5 participants