summaryrefslogtreecommitdiff
path: root/Mailman/pythonlib/cgi.py (unfollow)
Commit message (Collapse)AuthorFilesLines
1999-01-09GetValidValue(): Use new ValidateEmail() interface andbwarsaw1-12/+9
EmailAddressError, and clean up logic. ChangeOptions(): In the `subscribees' section, add a call to ValidateEmail() so that invalid email addresses can't be added in the Membership Management text window.
1999-01-09ApprovedAddMember(): Use the new ValidateEmail() interfacebwarsaw1-2/+2
1999-01-09ValidateEmail(): Renamed from ValidEmail().bwarsaw1-13/+13
Cleaned up its interface so that it always raises an exception if an address problem is uncovered (it used to both raise exceptions and return 0 or 1). It now has no useful return value. Added a re to barf on other unacceptable characters in an email address, currently: [ ] ( ) < > | ; Should there be others? The test that were there are retained, but the domain_parts test was cleaned up (there was a redundant test in there). Note that now unqualified addresses (e.g. those that don't contain an `@' are now DISALLOWED). This goes partially toward Greg Stein's suggestion.
1999-01-09A start on the conversion to class-based exceptions :-)bwarsaw1-2/+9
Because I want to be able to catch both MMBadEmailError and MMHostileAddress in a `politically correct' and clean except clause, I made both exceptions classes which derive from new exception class EmailAddressError.
1999-01-09main(): in previous VARHELP workaround, QUERY_STRING could exist butbwarsaw1-3/+4
be an empty string.
1999-01-09HandleRequests(): the entries in the FieldStorage `form' could be abwarsaw1-1/+4
list, and not have a `value' attribute. Don't try to int()ify them if so.
1999-01-09added a couple suggestionsbwarsaw1-0/+2
1999-01-09fix a typobwarsaw1-4/+4
1999-01-09A bunch of reformatting, updates, and adding a link to thebwarsaw1-12/+23
mailman-checkins mailing list.
1999-01-09A couple of updatesbwarsaw1-8/+11
1999-01-08main(): Kludge-around for accessing variable details when cookies arebwarsaw1-13/+23
disabled. The problem: because cookies are disabled, the admin has to authenticate for each access. We can't change this because otherwise option values could leak. So when the admin fills in the password and clicks `let me in...', the form gets POSTed, and even those the variable to get details on is given in the form's ACTION, cgi.py ignores any QUERY_STRING on a POST. Maybe cgi.py should be fixed? In the meantime, we just watch for the FieldStorage having a `request_login' field and a QUERY_STRING environment variable. In that case, we manually parse out the query string and use its value if available.
1999-01-08DeliverToList(): Ignore ECHILD exceptions that have been reported onbwarsaw1-1/+17
Linux systems when we close the cmdproc pipe. We could be masking a real bug, but I can't figure it out, and it seems harmless.
1999-01-08Changes to workaround some bogus clients which either don't include abwarsaw2-2/+34
content-type header, or include a bogus one. cgi.py FieldStorage.__init__(): if there is no content-type header, use text/plain for inner parts, but application/x-www-form-urlencoded for outer parts. Honor any existing content-type header. Lower down, if the content-type header is something we don't understand, default to text/plain for inner parts, but application/x-www-form-urlencoded for outer parts. This patch will be proposed for Python 1.5.2 driver run_main(): Play some games to get Mailman's special cgi.py module. We import it from Mailman.pythonlib.cgi, but then we jam this module into sys.modules['cgi'] so all those imports in all those Mailman.Cgi scripts get our special one (without having to hack all those scripts!)
1999-01-08forker(): fixed typo in docstring. Also use Utils.reraise() insteadbwarsaw1-2/+4
of manual re-raising.
1999-01-08Minor reformattingbwarsaw1-4/+4