Utils.get_domain() wrong if VIRTUAL_HOST_OVERVIEW off

Bug #266272 reported by Mark Sapiro
2
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.VIRTUAL_HOST_OVERVIEW and host:
        return host.lower()
    else:
        # See the note in Defaults.py concerning
DEFAULT_HOST_NAME
        # vs. DEFAULT_EMAIL_HOST.
        hostname = mm_cfg.DEFAULT_HOST_NAME or
mm_cfg.DEFAULT_EMAIL_HOST
        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.VIRTUAL_HOST_OVERVIEW and host:
        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.DEFAULT_URL_HOST
        return hostname.lower()

[http://sourceforge.net/tracker/index.php?func=detail&aid=1275856&group_id=103&atid=100103]

Tags: web-cgi
Revision history for this message
Mark Sapiro (msapiro) wrote :

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.