What changed, and why it matters
This commit simply removes an unused helper function called _match_hostname from the Electrum source code. The function was only used by tests and is described by the developer as dead code. There is no security-relevant change here.
No action needed. This is a routine code-cleanup commit with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes a 9-line helper function _match_hostname(name, val) from electrum/interface.py. The function performed a simple wildcard hostname match. It was not referenced elsewhere in production code and was labeled as used only by tests. No logic changes to certificate validation, networking, or security controls are present.
Changed components
electrum/interface.pyInspect captured patch +0 / −9
diff --git a/electrum/interface.py b/electrum/interface.py
index ab71a71..e62abc2 100644
--- a/electrum/interface.py
+++ b/electrum/interface.py
@@ -1825,15 +1825,6 @@ def check_cert(host, cert):
m += "has_expired: %s\n"% expired
util.print_msg(m)
-
-# Used by tests
-def _match_hostname(name, val):
- if val == name:
- return True
-
- return val.startswith('*.') and name.endswith(val[1:])
-
-
def test_certificates():
from .simple_config import SimpleConfig
config = SimpleConfig()
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.