[Mailman-Developers] lowercase in mailman create function

Mark Sapiro msapiro at value.net
Fri Oct 5 17:38:13 CEST 2007


Lawren Quigley-Jones wrote:
>
>I wrote a majordomo like interface for mailman which allows users to perform
>some backwards compatible functions via email, and access some information,
>like subscribed lists and owned lists via a web interface.
>
>When I released the interface to users, one of the first things a user did
>was to use all caps in the list they were attempting to create.  My script
>verifies that the list doesn't already exist:
>if Utils.list_exists(listName):


So does mlist.Create()


>which it didn't and then passes it into the mailman Create function.
>
>mlist.Create(listName, listOwner, listPasswordHash )
>
>There were no errors in the create process.  The problem was that the list
>was actually a duplicate of an existing list which obviously wasn't in all
>caps.  Since the process by which mailman gets the list configuration seems
>to be case insensitive, both lists would access the old config, so
>functionally I had two references to the same list.


I don't think this is quite correct in an OS with case sensitive path
names. I think you should have ended up with the original
lists/listname/ directory with it's original contents and a new
lists/LISTNAME/ directory with the new list's config.pck and other
files.

The real problems arise because the web CGIs lower case the list name,
and the MTA might not distinguish local parts that differ only in
case. Thus, the LISTNAME list is effectively unusable.


>The solution to the problem was to just .lower() the listName string at the
>top of the list create function, but it might make sense to lower the string
>in the Create function as mailman is not case sensitive after that point.


Lower casing the listname before calling Create() is what bin/newlist
and Mailman/Cgi/create.py do, so I could say that not doing that is a
misuse of the Create() method, but I agree that since upper and mixed
case names don't really work, the Create() method or possibly
Utils.list_exists() should do this.


>Let me know if you'd like me to open a bug for this issue...


Thanks for the report. I don't think it's necessary to open a bug. I'll
fix it without a bug in the tracker, but I would like some feedback if
anyone has any opinion on the best place to do it, i.e., the Create()
method, Utils.list_exists(), both or somewhere else.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Developers mailing list