Attach SSL context to SMTP notify and IMAP sensor#72568
Conversation
|
I think this is a good change, but this will be a breaking change for the reasons outlined in python/cpython#91826 (comment) In my experience there are a vast number of smtp servers that support STARTTLS but don't actually present a valid certificate because since they don't support SNI. SMTP server SNI support has historically been far behind what browsers support, and since other SMTP server's historically have not enforced verification, the state of these its not so great. I expect many users will need to turn the verification off to be able to send mail. |
|
Pushed a commit that allows disabling the SSL verification. By default certification is enabled. Made an exception to update YAML configuration because it's security related. |
bdraco
left a comment
There was a problem hiding this comment.
LGTM. Exception seems 100% justified to me given its security.
Breaking change
Proposed change
Default SSL contexts in Python standard lib for SMTP and IMAP are set to use an unverified context. This fixes it.
Thanks to @The-Compiler for his research and notifying us.
Background: python/cpython#91826
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: