summaryrefslogtreecommitdiff
path: root/Mailman/pythonlib/cgi.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2000-10-06process(): Don't try to restore the date if it is None, otherwise webwarsaw1-1/+2
get an annoying exception.
2000-10-06HasExplicitDest(): It is possible that the address part of the tuplebwarsaw1-0/+5
returned by getaddrlist() will return None. This happens if the header value is simply not RFC822 compliant. In that case, ignore this element.
2000-10-06quotemime(): Gross hack to ensure that the results returned are abwarsaw1-1/+2
string. If the input object is false, return the empty string.
2000-10-05process(): Honor "X-No-Archive: yes", which means don't add thebwarsaw1-2/+4
message to the archive. Retain "X-Archive: no" for backwards compatibility with my own hallucinations :). Resolves SF bug #115644.
2000-10-05HandleBouncingAddress(): Be more robust about getting the messagebwarsaw1-3/+13
body. If the msg object is one of our Message.Message's it'll have a body attribute. If it's a mimetool.Message, it'll have a rewindable fp attribute. But just to be sure, default the body to something reasonable.
2000-10-03Article.__init__(): Because I don't know why Pipermail uses modifiedbwarsaw1-2/+11
versions of the In-Reply-To, References, and Message-ID headers, I retain the original values in different variables. These are used to generate the periodic downloadable archives. _set_date(): Initialize date to '' not 'None' if there is no date header.
2000-10-03article_text_template: Get rid of this, we're going to do thingsbwarsaw1-15/+18
differently. class Article(): Get rid of text_tmpl for the same reason. as_text(): We need to retain In-Reply-To:, References:, and Message-ID: if the downloadable periodics are to be at all threadable. Suggested by Gerald Oskoboiny. Also, get something reasonable defaults for Date: header if the original message is missing it (i.e. "None" isn't reasonable :).
2000-10-02Added a hack to access the raw full archive when archives arebwarsaw1-12/+24
private. Specifically, main(): Check PATH_INFO and see if the paths is listname.mbox/listname.mbox, in which case the full archive is being retrieved. If so, make sure the Content-Type: is text/plain and feed the whole mbox out to the browser.
2000-10-02Fixes to the Pipermail TOC page, and to the monthly (or whateverbwarsaw1-18/+30
period) .txt files that ar generated. Specifically, sizeof(): factor out code to calculate size of file with appropriate bytes/KB/MB suffix. article_text_template: For proper parsing by most Unix mail compatible tools, the From: header should be in the form From: emailaddr (real name) Article.as_text(): Make sure the plain text headers have valid (even if bogus) From_ separator for compatibility with Unix mail and similar tools. Craft a fromdate and email address if they aren't present in the original message. TOC_template, html_TOC(): Added a link to the full raw archive file, which was always available, but hidden. You still need to go through private.py if the archives are private, of course. Also, report on the approximate size of the raw archive.
2000-10-02Since we now require Python 1.5.2 and that version has getpass in it'sbwarsaw1-107/+0
standard library, get rid of Mailman.pythonlib.getpass compatibility module.
2000-10-02cosmeticbwarsaw1-7/+8
2000-10-02Moved SITE_PW_FILE here from SecurityManager.pybwarsaw1-0/+2
2000-10-02Since we now require Python 1.5.2 and that version has getpass in it'sbwarsaw1-26/+28
standard library, get rid of Mailman.pythonlib.getpass compatibility module. Plus, general cleanup, and use SetSiteAdminPassword(), CheckSiteAdminPassword() from Utils instead of on a bogus MailList object.
2000-10-02SetSiteAdminPassword(), CheckSiteAdminPassword(): These are betterbwarsaw2-20/+18
suited in Utils than in the SecurityManager class because they don't require the MailList object at all.
2000-10-02Since we now require Python 1.5.2 and that version has getpass in it'sbwarsaw1-1/+1
standard library, get rid of Mailman.pythonlib.getpass compatibility module.
2000-10-02two changes to charset handling issues: check for charset injhylton2-15/+45
mm_cfg.VERBATIM_ENCODING list and do not call html_quote if it is found. The list should contain charsets that use multibyte encodings where 0x26 may not represented the & character. Add option for default charset (None == us-ascii). Fix bug in format_article that added <pre> tags to the message body *before* writing the text version. The fix isn't very clean, but it is functional and quick. Generate the HTML body and store it as html_body attribute. Use this in preference to body attribute when writing html output.
2000-09-29A couple of notes for laterbwarsaw2-0/+10
2000-09-29In preparation for 2.0 final, turn on STEALTH_MODEbwarsaw1-1/+1
2000-09-29Fixes for a minor local security hole. Some of the CGI scripts couldbwarsaw9-127/+62
bomb with tracebacks if PATH_INFO environment variable wasn't defined. Fixed this by making them all use Utils.GetPathPieces() and "doing something sensible" when that returned a false value. Also, edithtml is now hidden behind a login screen, so there's no need to enter the list password to edit the html. You can't even get to the list of files to edit unless you've admin authenticated. Closes SF bug #114091, Jitterbug PR# 24.
2000-09-28GetPathPieces(): Make this more efficient by using filter(), andbwarsaw1-9/+7
change the semantics for the most common situation: splitting the $PATH_INFO environment variable into components for the cgi scripts. ScriptURL(): This was the only non-CGI use of GetPathPieces() so now this just uses the filter() call instead of the new semantics.
2000-09-27Added some recommendations about upgrading template files, and aboutbwarsaw1-0/+11
the need to re-run configure (running config.status isn't sufficient).
2000-09-27AppendMessage(): Since we can't portably test the numeric/symbolicbwarsaw1-2/+3
error code raised by seek()ing before the end of a non-existant or zero length file, we simply ignore all IOErrors that can result.
2000-09-27run_script(): Generalize the filtering out of environment variables.bwarsaw1-6/+27
We now discard $PYTHONHOME and $PATH as well as the previously discarded $PYTHONPATH (which we later hand craft). Just a bit of extra paranoia.
2000-09-27run_main(): Moved the initialization of logger local to None outsidebwarsaw1-4/+4
the try block. Should have no practical effect, but makes debugging easier.
2000-09-26checkarchivedbs(): Don't bomb out if there are some nondirectories inbwarsaw1-1/+1
the private archive dir.
2000-09-25process(): Darrell Fuhriman notes that the List-Archive: header'sbwarsaw1-2/+3
value needs to be wrapped in angle brackets.
2000-09-25process(): Typo in Reply-To: munging section's logic crept into thebwarsaw1-1/+1
last patch. This caused confirmation requests to have a reply-to pointing back to the list. Closes bug #115253.
2000-09-24a few last minute updatesbwarsaw1-1/+1
2000-09-24Mailbox._fromlinepattern: optimizations by Tim Peters.bwarsaw1-1/+4
2000-09-24a few last minute updatesbwarsaw1-12/+14
2000-09-24a few last minute updatesbwarsaw1-3/+5
2000-09-24Mailbox._isrealfromline(): Integrate optimization from proposed Pythonbwarsaw1-0/+6
2.0 patch.
2000-09-24Fold the UnixMailbox optimization into Mailman.Mailbox.Mailbox class,bwarsaw1-6/+3
and use that class here.
2000-09-22Extensive cleanup and performance improvements. Most signficant changes are:jhylton2-86/+101
- add support for decoding subjects in links to next and prev message if the encodings of the two messages are the same - change re.sub('"',...) with string.replace('"', ...) - remove unused __processbody_CGIescape method - vast simplification and speed up of format_article (still more to do in methods it calls) - change logic of loadbody_fromHTML to avoid unnecessary tests - add slightly optimized mailbox class
2000-09-22misc cleanupjhylton1-29/+18
replace open calls with explicit open_ex add load method with code from __init__
2000-09-22Fix index generation bug that oocasionally prevented messages fromjhylton2-160/+202
appearing in index. pipermail generated several indexes by assuming that date was unique. If two messages arrived with, e.g., the same author and date, then the author index treated them as identical. As a result, both messages were archived, but only the last one was included in the index. Solution is to always include the msgid, which is unique, in the index key. Change database keys to combine elements using tuples instead of string concatenation with \000 as separator. Fix was accomplished by refactoring on pipermail.Database and its subclasses. Push index-key generation into common concrete base class Database; rename abstract base class to DatabaseInterface. Break up addArticle method into several pieces. TBD There is still more refactoring to do on Database class. Because date key has changed, HyperDatabase method to return first and last date changed to reflect format of date key. Refactor pipermail.T.add_article into several pieces.
2000-09-22a few last minute additionsbwarsaw1-1/+5
2000-09-22minor proofreadingbwarsaw1-6/+7
2000-09-22Bugs and patches go to SourceForge now.bwarsaw1-4/+13
2000-09-22Dang, another problem with --prefix and --with-var-prefix interaction.bwarsaw2-40/+42
2000-09-22newly generated from 2.0b6's TODO listbwarsaw1-131/+138
2000-09-22Removed debugging print.bwarsaw1-1/+0
2000-09-22New TODO => todo.html generator. Requires Python 2.0bwarsaw1-52/+47
2000-09-22apply patch #100867-- add robot meta tags to cause more intelligentjhylton1-0/+3
search engine indexing of index and message pages
2000-09-22replace null bytes in message body with spacesjhylton1-2/+4
2000-09-22More acks.bwarsaw2-1/+5
2000-09-22Updates for 2.0beta6bwarsaw1-0/+79
2000-09-22Another fix for --prefix, --with-var-prefixbwarsaw2-50/+60
2000-09-22Article._get_body(): Python 1.5.2's int() takes only one argument.bwarsaw1-1/+1
2000-09-22decode quoted-printable message bodiesjhylton1-4/+38
keep _charsets dictionary in pickled rep of archive; this allows the charset for an index page to be set based on the total count of charsets in all messages