CVS: tmda/bin ChangeLog,1.272,1.273 tmda-rfilter,1.90,1.91

"Jason R. Mastaler" <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv3124/bin

Modified Files:
	ChangeLog tmda-rfilter 
Log Message:
The new style confirm_accept_url is much longer than the original
format in order to support "virtual users", so it makes sense to
only use the longer format when we are in fact dealing with
virtual users.

CGI_VIRTUALUSER (off by default) toggles whether the extended
format is used or not.  It's possible this variable may be used
for other things in the future.  The user or administrator
should set this to 1 if she intends to use tmda-cgi with
virtual users.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.272
retrieving revision 1.273
diff -u -r1.272 -r1.273
--- ChangeLog	25 May 2003 03:23:55 -0000	1.272
+++ ChangeLog	25 May 2003 05:14:21 -0000	1.273
@@ -1,3 +1,8 @@
+2003-05-24  Jason R. Mastaler  <[email protected]>
+
+	* tmda-rfilter (bouncegen): Consult Defaults.CGI_VIRTUALUSER when
+	creating confirm_accept_url.
+
 2003-05-24  Tim Legant  <[email protected]>
 
 	* tmda-inject (inject_message): Use Util.add_headers and

Index: tmda-rfilter
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-rfilter,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- tmda-rfilter	14 May 2003 21:31:38 -0000	1.90
+++ tmda-rfilter	25 May 2003 05:14:21 -0000	1.91
@@ -650,15 +650,23 @@
                                                              'accept')
         if Defaults.CGI_URL:
             # create the url for tmda-cgi release.
-            # include the current uid, recipient address, and release cookie.
-            confirm_accept_url = '%s?%s&%s&%s' %(Defaults.CGI_URL,
-                                                 os.getuid(),
-                                                 recipient_address,
-                                                 Cookie.make_confirm_cookie(
-                                                   timestamp,
-                                                   pid,
-                                                   'accept'
-                                                   ) )
+
+            if Defaults.CGI_VIRTUALUSER:
+                # include the current uid, recipient address, and release cookie.
+                confirm_accept_url = '%s?%s&%s&%s' %(Defaults.CGI_URL,
+                                                     os.getuid(),
+                                                     recipient_address,
+                                                     Cookie.make_confirm_cookie(
+                    timestamp,
+                    pid,
+                    'accept'
+                    ))
+            else:
+                # include the current euid and release cookie.
+                confirm_accept_url = '%s?%s.%s' %(Defaults.CGI_URL, os.geteuid(),
+                                                  Cookie.make_confirm_cookie(timestamp,
+                                                                             pid,
+                                                                             'accept'))
         pending_message = create_pending_msg(timestamp, pid)
     elif mode == 'hold':
         pending_message = create_pending_msg(str('%d' % now), Defaults.PID)

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.