logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: tmda/TMDA ChangeLog,1.166,1.167 Defaults.py,1.107,1.108 Util.py,1.44,1: msg#00112

Subject: CVS: tmda/TMDA ChangeLog,1.166,1.167 Defaults.py,1.107,1.108 Util.py,1.44,1.45
Update of /cvsroot/tmda/tmda/TMDA
In directory usw-pr-cvs1:/tmp/cvs-serv18501/TMDA

Modified Files:
        ChangeLog Defaults.py Util.py 
Log Message:
Since the shell now comes into play when invoking /usr/sbin/sendmail,
we need to quote both the sender and recip arguments in case they
contain shell meta-characters.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/ChangeLog,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- ChangeLog   26 Feb 2002 04:07:46 -0000      1.166
+++ ChangeLog   26 Feb 2002 17:20:31 -0000      1.167
@@ -1,3 +1,8 @@
+2002-02-26  Jason R. Mastaler  <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxxxx>
+
+       * Util.py (sendmail): Add quotes around both the sender and
+       recipient when calling sendmail from the shell.
+
 2002-02-25  Tim Legant  <tim@xxxxxxxxxxx>
 
        * Defaults.py: Documented additional options for ACTION_OUTGOING.
@@ -14,9 +19,6 @@
 
 2002-02-23  Jason R. Mastaler  <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxxxx>
 
-       * Defaults.py (BOUNCE_ENV_SENDER): Fix quoting to comply with
-       Util.sendmail().
-       
         * Util.py (pipecmd): New function that runs child processes with
         error checking.
 

Index: Defaults.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Defaults.py,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- Defaults.py 26 Feb 2002 04:07:46 -0000      1.107
+++ Defaults.py 26 Feb 2002 17:20:31 -0000      1.108
@@ -154,10 +154,10 @@
 if not vars().has_key('BOUNCE_ENV_SENDER'):
     # Exim and Sendmail don't like -f ''
     if MAIL_TRANSFER_AGENT in ('exim', 'sendmail'):
-        BOUNCE_ENV_SENDER = "'<>'"
+        BOUNCE_ENV_SENDER = '<>'
     else:
-        BOUNCE_ENV_SENDER = "''"
-
+        BOUNCE_ENV_SENDER = ''
+        
 # BARE_APPEND
 # Filename to which a recipient's e-mail address should be
 # automatically appended if the outgoing <action> is in the form

Index: Util.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Util.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Util.py     24 Feb 2002 03:35:31 -0000      1.44
+++ Util.py     26 Feb 2002 17:20:32 -0000      1.45
@@ -332,10 +332,10 @@
     """
     import Defaults
     if return_path is not None:
-        env_sender = '-f ' + return_path
+        env_sender = "-f '%s'" % (return_path)
     else:
         env_sender = ''
-    cmd = "%s %s %s" % (Defaults.SENDMAIL, env_sender, recip)
+    cmd = "%s %s '%s'" % (Defaults.SENDMAIL, env_sender, recip)
     pipecmd(cmd, str(headers), '\n', body)
 
 

_______________________________________________
tmda-cvs mailing list
http://libertine.org/lists/listinfo/tmda-cvs



<Prev in Thread] Current Thread [Next in Thread>