Repository navigation
Say both paho majors hit ssl.match_hostname on a direct check_hostname flip - #2959
Conversation
|
ESPHome Bot (@esphbot) review |
There was a problem hiding this comment.
🟢 Approval recommended
Both edits consistently correct documentation without changing executable code or leaving unresolved issues.
No open issues 🎉
What changed in this PR
Corrects the MQTT TLS documentation introduced in #2958 to clarify that directly disabling check_hostname reaches the removed ssl.match_hostname in both paho 1.x and 2.x.
Changes:
- Updates the inline TLS warning and matching architecture text.
- Leaves runtime behavior unchanged, retaining
tls_insecure_setforskip_cert_cn_check.
| File | Description |
|---|---|
esphome_device_builder/controllers/_device_mqtt_monitor.py |
Corrects the comment to cover both paho majors. |
docs/ARCHITECTURE.md |
Aligns the MQTT TLS explanation with the corrected comment. |
Review effort: Balanced
Merging this PR will not alter performance
Comparing Footnotes
|
PR Review — Say both paho majors hit ssl.match_hostname on a direct check_hostname flipThis is a correct wording fix with no behaviour change, and it is ready to merge. What the PR does well:
No findings. Automated review by Kōan (Claude) |
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2959 +/- ##
=======================================
Coverage 99.76% 99.76%
=======================================
Files 300 300
Lines 26429 26429
=======================================
Hits 26367 26367
Misses 62 62
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
What does this implement/fix?
Corrects the note beside the
skip_cert_cn_checkhandling: a directcheck_hostnameflip reaches the removedssl.match_hostnameon paho 2.x exactly as on 1.x, so the comment and the architecture paragraph should not single out paho 1.x.tls_insecure_set._apply_tlscomment and the matching sentence indocs/ARCHITECTURE.md.Evidence
paho 2.1.0's
_ssl_wrap_socketstill ends withssl.match_hostname(ssl_sock.getpeercert(), self._host)whenever_tls_insecureis false and the context'scheck_hostnameis false, which is exactly the state a direct flip produces. Verified against a local mosquitto TLS listener on Python 3.13:tls_insecure_set(True)ctx.check_hostname = FalsedirectlyAttributeError: module 'ssl' has no attribute 'match_hostname'AttributeError: module 'ssl' has no attribute 'match_hostname'Related issue or feature (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Checklist
ruff,codespell, yaml/json/python checks).tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited (regenerate viascript/sync_components.pyif a sync is needed).docs/ARCHITECTURE.mdand/ordocs/API.md.