From: richard Date: Wed, 18 Jun 2003 23:34:52 +0000 (+0000) Subject: handle missing Subject: line (sf bug 755331) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=52465efa9ed82963fef39525b015ece4e24c0485;p=roundup.git handle missing Subject: line (sf bug 755331) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1733 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 52f1150..f40d012 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,8 @@ are given with the most recent entry first. 2003-??-?? 0.6.0?? - plugged cross-site-scripting hole (thanks Jeff Epler) +- handle deprecation of FCNTL in python2.2+ (sf bug 756756) +- handle missing Subject: line (sf bug 755331) 2003-06-10 0.6.0b3 diff --git a/roundup/mailgw.py b/roundup/mailgw.py index e942fe8..1e24485 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -73,7 +73,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.122 2003-06-18 23:31:52 richard Exp $ +$Id: mailgw.py,v 1.123 2003-06-18 23:34:52 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -487,6 +487,11 @@ class MailGW: # handle the subject line subject = message.getheader('subject', '') + if not subject: + raise MailUsageError, ''' +Emails to Roundup trackers must include a Subject: line! +''' + if subject.strip().lower() == 'help': raise MailUsageHelp