-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Changing the default value for ssl_check_hostname to True, to ensure security validations are not skipped by default #3626
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
Changing the default value for ssl_check_hostname to True, to ensure security validations are not skipped by default #3626
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the default value for ssl_check_hostname from False to True to enforce stricter security validations by default. Key changes include updating the default in production code (in redis/connection.py, redis/client.py, and their asyncio equivalents) while tests and examples explicitly override the value for backward compatibility or simulation of insecure scenarios.
- Production connection and client constructors now default to ssl_check_hostname=True.
- Tests and examples explicitly pass ssl_check_hostname=False to simulate non-secure connections.
- Documentation examples have been updated to reflect the new production default.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
tests/test_ssl.py | Added explicit override of ssl_check_hostname for SSL connection tests |
tests/test_connect.py; test_asyncio files | Modified connection parameter overrides to include ssl_check_hostname=False in tests |
redis/connection.py, redis/client.py, etc. | Updated default ssl_check_hostname parameter from False to True |
docs/examples/ssl_connection_examples.ipynb | Updated examples to include ssl_check_hostname parameter explicitly |
Comments suppressed due to low confidence (1)
redis/connection.py:1031
- Changing the default to True enhances security by ensuring hostname validation; verify that any integrations or custom overrides still function as expected.
ssl_check_hostname: bool = True,
…security validations are not skipped by default
a39dd82
to
fc0e050
Compare
…security validations are not skipped by default (#3626) * Changing the default value for ssl_check_hostname to True, to ensure security validations are not skipped by default * Applying review comments * Removing unused operation in tests. * Removing unneeded comment from tests.
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Changing the default value for ssl_check_hostname to True, to ensure security validations are not skipped by default