-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
unsafe legacy renegotiation disabled
error in specific website on Python 3.12
#6537
Comments
That exact error is coming from the |
@sigmavirus24 Thanks for your response. I understand that the error is originating from the ssl module and not specifically from requests. However, I'm still puzzled about a few aspects:
If this isn't considered an error, could you provide any recommendations for potential solutions involving a custom adapter? |
We use the standard cipher suites from the stdlib/OpenSSL. There may be a change there causing you problems. You could use a tool to compare them like Wireshark but that isn't something we will help you with. Browsers don't use OpenSSL. They're also usually far more permissive to avoid complaints like this. https://stackoverflow.com/a/71646353 Should help you |
See also urllib3/urllib3#2653 |
@sigmavirus24 Thank you. I will use the adapter you recommended. |
For complete implementation in code -> https://gist.github.com/FluffyDietEngine/94c0137445555a418ac9f332edfa6f4b |
Issue Description
I've encountered a puzzling issue related to the
requests
library when using Python 3.12. Specifically, I'm receiving an "unsafe legacy renegotiation disabled" error when trying to access a specific website. This problem appears to be unique to Python 3.12, as I did not encounter it when using Python 3.11.4.I've encountered a puzzling issue related to the requests library when using Python 3.12. Specifically, I'm receiving an "unsafe legacy renegotiation disabled" error when trying to access a specific website, bufftoon.plaync.com/series/1001216. While I initially suspected that the issue might be related to the website itself, further investigation suggests that it's not the root cause. The error message indicates a problem with renegotiating SSL connections, which may be caused by Python 3.12, the requests library, OpenSSL, or other system-specific elements.
Reproduction Steps
I've tested this in both Jupyter and a standard Python file, and the outcomes were the same. While accessing the website, you might need to use a VPN or Proxy to bypass any restrictions related to an abroad IP address. However, I found that the website produced consistent results when accessed through Github Codespace, hosted in Singapore, it appears that such limitations may not apply.
To reproduce the issue, you can use the following Python code:
Expected Result
The expected result when running the code should be:
Actual Result
However, when executing the same code on Python 3.12.0rc3, I encountered the following error:
Additional Information
I conducted tests on both Python 3.11.4 and Python 3.12.0rc3, and the outcomes were as follows:
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]:
Python 3.12.0rc3 (tags/v3.12.0rc3:b973ab3, Sep 19 2023, 09:39:54) [MSC v.1935 64 bit (AMD64)]:
System Information
Here's the system information for Python 3.11.4 and Python 3.12:
Python 3.11.4:
Python 3.12.0rc3:
Please help investigate this issue as it appears to be specific to Python 3.12 and is causing disruptions in accessing this website. Thank you.
The text was updated successfully, but these errors were encountered: