CVS: tmda-cgi ChangeLog,1.43,1.44 Release.py,1.7,1.8

Gre7g Luterman <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda-cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv13521

Modified Files:
	ChangeLog Release.py 
Log Message:
Fixed a bug that messed up URL confirmations for real users with virtual user
URL format.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/ChangeLog,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- ChangeLog	12 Jun 2003 04:10:31 -0000	1.43
+++ ChangeLog	14 Jun 2003 15:22:19 -0000	1.44
@@ -1,3 +1,10 @@
+2003-06-14  Gre7g Luterman  <[email protected]>
+
+	* Fixed a bug that messed up URL confirmations for real users with
+	  virtual user URL format.
+
+	* Added a link to log back in to the "IP has changed error".
+
 2003-06-11  Gre7g Luterman  <[email protected]>
 
 	* Added %(Name)s as a substitution variable during auto-install.

Index: Release.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/Release.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Release.py	26 May 2003 20:14:14 -0000	1.7
+++ Release.py	14 Jun 2003 15:22:19 -0000	1.8
@@ -56,7 +56,6 @@
   try:
     UID, Recipient, Cookie = QueryString.split("&")
     UID = int(UID)
-    GID = int(pwd.getpwuid(UID)[3])
     OldStyle = 0
 
     # Get base address from Recipient
@@ -67,9 +66,6 @@
       # Check for old-style format
       UID, Cookie = QueryString.split(".", 1)
       UID = int(UID)
-      UserRec = pwd.getpwuid(UID)
-      User = UserRec[0]
-      GID = int(UserRec[3])
       OldStyle = 1
     except (ValueError, KeyError):
       CgiUtil.TermError("Unable to parse query string.",
@@ -115,19 +111,19 @@
           "TMDA_VLOOKUP = %s" % os.environ["TMDA_VLOOKUP"],
           """Contact this message's sender by an alternate means and inform them
 of this error, or try confirming your message using an alternate method.""")
-      Home, Uid, Gid = Sandbox["getuserparams"](List)
+      Home, UID, GID = Sandbox["getuserparams"](List)
     else:
-      Home, Uid, Gid = Util.getuserparams( User )
+      Home, UID, GID = Util.getuserparams(pwd.getpwuid(UID)[0])
   except KeyError:
     CgiUtil.TermError("No such user", "User %s not found" % User, 
-        "find user %s" % User, "", 
-        """Contact this message's sender by an alternate means and inform them
+      "find user %s" % User, "", 
+      """Contact this message's sender by an alternate means and inform them
 of this error, or try confirming your message using an alternate method.""")
-  if Uid < 2:
+  if UID < 2:
     PasswordRecord = pwd.getpwnam(os.environ["TMDA_VUSER"])
-    Uid = PasswordRecord[2]
-    Gid = PasswordRecord[3]
-    if not int(Uid):
+    UID = PasswordRecord[2]
+    GID = PasswordRecord[3]
+    if not int(UID):
       CgiUtil.TermError("TMDA_VUSER is UID 0.", "It is not safe to run "
         "tmda-cgi as root.", "set euid",
         "TMDA_VUSER = %s" % os.environ["TMDA_VUSER"],
@@ -147,8 +143,8 @@
   try:
     os.seteuid(0)
     os.setegid(0)
-    os.setgid(int(Gid))
-    os.setuid(int(Uid))
+    os.setgid(int(GID))
+    os.setuid(int(UID))
   except OSError:
     pass
 

_______________________________________
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.