Utils.get_domain() wrong if VIRTUAL_HOST_OVERVIEW off
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Part of the code in get_domain() in Utils.py is:
if mm_cfg.
return host.lower()
else:
# See the note in Defaults.py concerning
DEFAULT_HOST_NAME
# vs. DEFAULT_EMAIL_HOST.
hostname = mm_cfg.
mm_cfg.
return hostname.lower()
It is clear that get_domain() should return the web
host, not the e-mail host. This code should be:
if mm_cfg.
return host.lower()
else:
# See the note in Defaults.py concerning
DEFAULT_URL
# vs. DEFAULT_URL_HOST.
hostname = mm_cfg.DEFAULT_URL or
mm_cfg.
return hostname.lower()
[http://
Fixed in CVS for releases above 2.1.8a1.
hostname = mm_cfg.DEFAULT_URL or mm_cfg. DEFAULT_ URL_HOST
is not the correct fix as DEFAULT_URL is a URL, not a
domain, so I changed it to
hostname = mm_cfg. DEFAULT_ HOST_NAME or mm_cfg. DEFAULT_ URL_HOST