CVS: tmda/TMDA ChangeLog,1.302,1.302.2.1 Util.py,1.110,1.110.2.1
"Jason R. Mastaler" <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda/TMDA
In directory sc8-pr-cvs1:/tmp/cvs-serv29684
Modified Files:
Tag: release-1-0
ChangeLog Util.py
Log Message:
Bugfix. confirm_append_address() was not checking whether the address
was fully formed (user@hostname) before processing it. This would
result in a ValueError when we attempted to split the address on '@'.
Reported by Andrea Whitlock on tmda-users.
Will apply to main trunk as well.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/ChangeLog,v
retrieving revision 1.302
retrieving revision 1.302.2.1
diff -u -r1.302 -r1.302.2.1
--- ChangeLog 10 Dec 2003 07:36:55 -0000 1.302
+++ ChangeLog 9 Jan 2004 19:21:50 -0000 1.302.2.1
@@ -1,3 +1,9 @@
+2004-01-09 Jason R. Mastaler <[email protected]>
+
+ * Util.py (confirm_append_address): Return the envelope sender
+ address immediately if either the Return-Path address or
+ X-Primary-Address is not in user@hostname format.
+
2003-12-10 Tim Legant <[email protected]>
* Pending.py (Message.show): Change implementation to catch
Index: Util.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Util.py,v
retrieving revision 1.110
retrieving revision 1.110.2.1
diff -u -r1.110 -r1.110.2.1
--- Util.py 14 Oct 2003 00:02:11 -0000 1.110
+++ Util.py 9 Jan 2004 19:21:50 -0000 1.110.2.1
@@ -1,6 +1,6 @@
# -*- python -*-
#
-# Copyright (C) 2001,2002,2003 Jason R. Mastaler <[email protected]>
+# Copyright (C) 2001,2002,2003,2004 Jason R. Mastaler <[email protected]>
#
# This file is part of TMDA.
#
@@ -461,9 +461,11 @@
rp is the envelope sender address.
Compare the two addresses, and return the address appropriate for
- CONFIRM_APPEND use based on the PRIMARY_ADDRESS_MATCH setting.
+ CONFIRM_APPEND based on the PRIMARY_ADDRESS_MATCH setting.
"""
if not xp:
+ return rp
+ if '@' not in rp or '@' not in xp:
return rp
import Defaults
rpl = rp.lower()