Skip to content

Commit 14f8fbe

Browse files
author
Richard Jones
committed
handle missing Subject: line [SF#755331]
1 parent de821a7 commit 14f8fbe

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ are given with the most recent entry first.
33

44
2003-??-?? 0.6.0??
55
- plugged cross-site-scripting hole (thanks Jeff Epler)
6+
- handle deprecation of FCNTL in python2.2+ (sf bug 756756)
7+
- handle missing Subject: line (sf bug 755331)
68

79

810
2003-06-10 0.6.0b3

roundup/mailgw.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.122 2003-06-18 23:31:52 richard Exp $
76+
$Id: mailgw.py,v 1.123 2003-06-18 23:34:52 richard Exp $
7777
'''
7878

7979
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
@@ -487,6 +487,11 @@ def handle_message(self, message):
487487
# handle the subject line
488488
subject = message.getheader('subject', '')
489489

490+
if not subject:
491+
raise MailUsageError, '''
492+
Emails to Roundup trackers must include a Subject: line!
493+
'''
494+
490495
if subject.strip().lower() == 'help':
491496
raise MailUsageHelp
492497

0 commit comments

Comments
 (0)