empty charset in header crashes admindb.py

Bug #266147 reported by Rixhq
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Unassigned

Bug Description

when a message contains a header like this:
Content-Type: text/plain; charset=

(note the empty charset)
The admindb.py details page page gives an error.
Traceback is below. Btw does this mean the charset
value in the header is directly mapped to a module name
to import? (sounds kinda scary...)
I know the real fault is in the message (I'm not sure
if the mime stripper caused this or a bad mailer), but
maybe mailman shouldn't crash on this.

Traceback (most recent call last):
  File "/usr/local/mailman/scripts/driver", line 87, in
run_main
    main()
  File "/usr/local/mailman/Mailman/Cgi/admindb.py",
line 222, in main
    show_detailed_requests(mlist, form)
  File "/usr/local/mailman/Mailman/Cgi/admindb.py",
line 545, in show_detailed_requests
    show_post_requests(mlist, id, info, total, count, form)
  File "/usr/local/mailman/Mailman/Cgi/admindb.py",
line 611, in show_post_requests
    body = unicode(body, mcset).encode(lcset)
  File "/usr/lib/python2.2/encodings/__init__.py", line
51, in search_function
    mod = __import__(modname,globals(),locals(),'*')
ValueError: Empty module name

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

Tags: web-cgi
Revision history for this message
Idogan (idogan) wrote :
Download full text (7.3 KiB)

I have exactly the same problem:

Nov 30 21:53:09 2004 admin(21885):
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
admin(21885): [----- Mailman Version: 2.1.5 -----]
admin(21885): [----- Traceback ------]
admin(21885): Traceback (most recent call last):
admin(21885): File "/opt/mailman/scripts/driver", line 87,
in run_main
admin(21885): main()
admin(21885): File "/opt/mailman/Mailman/Cgi/admindb.py",
line 163, in main
admin(21885): process_form(mlist, doc, cgidata)
admin(21885): File "/opt/mailman/Mailman/Cgi/admindb.py",
line 711, in process_form
admin(21885): forward, forwardaddr)
admin(21885): File "/opt/mailman/Mailman/ListAdmin.py",
line 159, in HandleRequest
admin(21885): forward, addr)
admin(21885): File "/opt/mailman/Mailman/ListAdmin.py",
line 345, in __handlepost
admin(21885): syslog('vette', note)
admin(21885): File
"/opt/mailman/Mailman/Logging/Syslog.py", line 40, in write
admin(21885): self.write_ex(kind, msg, args, kws)
admin(21885): File
"/opt/mailman/Mailman/Logging/Syslog.py", line 58, in write_ex
admin(21885): logf.write(msg + '\n')
admin(21885): File
"/opt/mailman/Mailman/Logging/StampedLogger.py", line 73, in
write
admin(21885): Logger.write(self, "%s %s" % (prefix, msg))
admin(21885): File
"/opt/mailman/Mailman/Logging/Logger.py", line 91, in write
admin(21885): f.write(msg)
admin(21885): UnicodeEncodeError: 'ascii' codec can't encode
character u'\xfc' in position 90: ordinal not in range(128)
admin(21885): [----- Python Information -----]
admin(21885): sys.version = 2.3.4 (#1, Nov 10 2004,
13:08:40) [C]
admin(21885): sys.executable = /opt/csw/bin/python
admin(21885): sys.prefix = /opt/csw
admin(21885): sys.exec_prefix = /opt/csw
admin(21885): sys.path = /opt/csw
admin(21885): sys.platform = sunos5
admin(21885): [----- Environment Variables -----]
admin(21885): HTTP_COOKIE:
eth+admin=2802000000694eddac41732800000031336161396238633262356333316431613335633033383739313330326164303462643162393164

admin(21885): SERVER_SOFTWARE: Apache/2.0.52 (Unix)
admin(21885): SCRIPT_NAME: /mailman/admindb
admin(21885): SERVER_SIGNATURE: <address>Apache/2.0.52
(Unix) Server at lists.dogan.ch Port 443</address>
admin(21885):
admin(21885): REQUEST_METHOD: POST
admin(21885): HTTP_KEEP_ALIVE: 300
admin(21885): SERVER_PROTOCOL: HTTP/1.1
admin(21885): QUERY_STRING:
admin(21885): CONTENT_LENGTH: 433
admin(21885): HTTP_ACCEPT_CHARSET:
ISO-8859-1,utf-8;q=0.7,*;q=0.7
admin(21885): HTTP_USER_AGENT: Mozilla/5.0 (X11; U; FreeBSD
i386; en-US; rv:1.7.3) Gecko/20041108
admin(21885): HTTP_CONNECTION: keep-alive
admin(21885): HTTP_REFERER:
https://lists.dogan.ch/mailman/admindb/eth
admin(21885): SERVER_NAME: lists.dogan.ch
admin(21885): REMOTE_ADDR: 213.144.141.146
admin(21885): PATH_TRANSLATED:
/var/www/lists.dogan.ch/htdocs/eth
admin(21885): SERVER_PORT: 443
admin(21885): SERVER_ADDR: 213.144.137.44
admin(21885): DOCUMENT_ROOT: /var/www/lists.dogan.ch/htdocs
admin(21885): PYTHONPATH: /opt/mailman
admin(21885): SCRIPT_FILENAME: /opt/mailman/cgi-bin/admindb
admin(21885): SERVER_ADMIN: <email address hidden>
admin(21885): HTTP_...

Read more...

Revision history for this message
Tokio Kikuchi (tkikuchi) wrote :

Fixed in CVS. (admindb.py Revision 2.45.2.8)

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.