diff options
| author | bwarsaw | 2000-12-26 18:20:01 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-12-26 18:20:01 +0000 |
| commit | e5c72c764a5ddb42c1b927d89047c8b2af336043 (patch) | |
| tree | 6c109e1ce2fc99133403d9d1aa8c3efeaf450c06 /Mailman/Cgi/private.py | |
| parent | 369e010d18dced7e3cd25255fc06830ad7cbc56b (diff) | |
| download | mailman-e5c72c764a5ddb42c1b927d89047c8b2af336043.tar.gz mailman-e5c72c764a5ddb42c1b927d89047c8b2af336043.tar.zst mailman-e5c72c764a5ddb42c1b927d89047c8b2af336043.zip | |
Diffstat (limited to 'Mailman/Cgi/private.py')
| -rw-r--r-- | Mailman/Cgi/private.py | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py index d8d799eb3..337da2e35 100644 --- a/Mailman/Cgi/private.py +++ b/Mailman/Cgi/private.py @@ -29,49 +29,6 @@ from Mailman.Logging.Syslog import syslog LogStdErr("error", "private") - -PAGE = ''' -<html> -<head> - <title>%(listname)s Private Archives Authentication</title> -</head> -<body bgcolor="#ffffff"> -<FORM METHOD=POST ACTION="%(basepath)s/"> - <TABLE WIDTH="100%%" BORDER="0" CELLSPACING="4" CELLPADDING="5"> - <TR> - <TD COLSPAN="2" WIDTH="100%%" BGCOLOR="#99CCFF" ALIGN="CENTER"> - <B><FONT COLOR="#000000" SIZE="+1">%(listname)s Private Archives - Authentication</FONT></B> - </TD> - </TR> - <tr> - <td COLSPAN="2"> <P>%(message)s </td> - <tr> - </tr> - <TD> <div ALIGN="Right">Address: </div></TD> - <TD> <INPUT TYPE=TEXT NAME=username SIZE=30> </TD> - <tr> - </tr> - <TD> <div ALIGN="Right"> Password: </div> </TD> - <TD> <INPUT TYPE=password NAME=password SIZE=30></TD> - <tr> - </tr> - <td></td> - <td> <INPUT TYPE=SUBMIT VALUE="Let me in..."> - </td> - </tr> - </TABLE> - <p><strong><em>Important:</em></strong> From this point on, you - must have cookies enabled in your browser, otherwise you will not - be able to read the private archives. - - <p>Session cookies are used in the private archives so that you - don\'t need to re-authenticate for every article your read. This - cookie will expire automatically when you exit your browser. -</FORM> -''' - - login_attempted = 0 _list = None @@ -169,12 +126,12 @@ def main(): if not is_auth: # Output the password form - print 'Content-type: text/html\n\n' - page = PAGE - while path and path[0] == '/': path=path[1:] # Remove leading /'s + print 'Content-type: text/html; charset=' + Utils.GetCharSet() + '\n\n' + while path and path[0] == '/': + path=path[1:] # Remove leading /'s basepath = os.path.split(mlist.GetBaseArchiveURL())[0] listname = mlist.real_name - print page % vars() + print Utils.maketext('private.txt', vars(), mlist.preferred_language) sys.exit(0) # Authorization confirmed... output the desired file @@ -190,7 +147,7 @@ def main(): else: f = open(true_filename, 'r') except IOError: - print 'Content-type: text/html\n' + print 'Content-type: text/html; charset=' + Utils.GetCharSet() + '\n\n' print "<H3>" + _("Archive File Not Found") + "</H3>" print _("No file"), path, '(%s)' % true_filename |
