Update of /cvsroot/tmda/tmda/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv25201/bin

Modified Files:
        ChangeLog tmda-rfilter 
Log Message:
Add CGI_URL for things like constructing the message release
URL when using tmda-cgi.

If this variable is set, tmda-rfilter constructs a release URL
for the message and stores it in `confirm_accept_url'.

Then the user can imbed the URL in her template by adding something
like this to confirm_request.txt:

  To release your message, click on %(confirm_accept_url)s

An example URL is:

http://www.domain.tld/tmda.cgi?684.1038959858.48460.c7a2e8

The first integer is the euid which is necessary for the cgi to know
which pending directory to look in, which configuration file to load,
etc.

The next two portions identify the message-id on disk, and the last is
the HMAC. These three are the same as the "cookie" included within the
confirmation e-mail address.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.244
retrieving revision 1.245
diff -u -r1.244 -r1.245
--- ChangeLog   25 Nov 2002 08:37:49 -0000      1.244
+++ ChangeLog   6 Dec 2002 23:48:12 -0000       1.245
@@ -1,3 +1,8 @@
+2002-12-06  Jason R. Mastaler  <[EMAIL PROTECTED]>
+
+       * tmda-rfilter (bouncegen): confirm_accept_url holds the release
+       URL if using tmda-cgi.
+
 2002-11-25  David Guerizec  <[EMAIL PROTECTED]>
 
     * tmda-pending: Use the new module Pending.py

Index: tmda-rfilter
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-rfilter,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- tmda-rfilter        2 Dec 2002 22:26:44 -0000       1.76
+++ tmda-rfilter        6 Dec 2002 23:48:12 -0000       1.77
@@ -633,6 +633,12 @@
                                                              timestamp,
                                                              pid,
                                                              'accept')
+        if Defaults.CGI_URL:
+            # e.g, http://www.domain.tld/tmda.cgi?684.1038959858.48460.c7a2e8
+            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

Reply via email to