summaryrefslogtreecommitdiff
path: root/Mailman/Cgi/handle_opts.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* This file is no longer necessary. All the functionality has beenbwarsaw2001-05-311-346/+0
| | | | moved to the options.py file.
* process_form(): Add support for SuppressPasswordReminder user option.bwarsaw2001-05-251-0/+4
|
* Application of SF patch #420396, submitted by Tokio Kikuchi. Thisbwarsaw2001-05-161-2/+15
| | | | script was not setting up the i18n environment in the `blessed' way.
* Be more paranoid about abnormal shutdown conditions, specifically:bwarsaw2001-05-031-4/+24
| | | | | | | | | | | | | | | | | | | | | main(): When the user hits the stop button on their browser during a long running operation, Apache 1.3/mod_cgi will eventually catch a SIGPIPE when output is written to the client. It then turns around and SIGTERMs the cgi process, waits three seconds, then SIGKILLs the cgi process. This patch fixes the stale lock file that can result under this situation. Since Python by default doesn't catch SIGTERM, and SIGKILL is uncatchable, either signal would cause the cgi process to exit without raising an exception, giving no chance for the script to clean up after itself. We now open the MailList object in two phases: first, open it unlocked, then lock it and install a SIGTERM handler. The SIGTERM handler unlocks the list and exits, aborting any changes that may have taken place. This is the safest way to ensure that stale locks won't be left around causing other hits on the list to become wedged for a long time. Also, de-string-modulification.
* process_form(): Passwords are no longer required for unsubscribing.bwarsaw2001-04-021-4/+4
| | | | If missing, just arrange to have the unsubscription request confirmed.
* process_form(): There's no `mail' local variable, so origsender isbwarsaw2001-03-241-3/+2
| | | | bogus too. Fix these references to `user' instead.
* More i18n changes.bwarsaw2001-02-281-12/+19
| | | | | | Fix some _() wrappings to use local variables. Also convert to use mimelib interface.
* jcrey's latest round of I18N changes.bwarsaw2000-12-261-36/+56
|
* First round integration of Juan Carlos's translatable string markings.bwarsaw2000-12-071-46/+46
|
* process_form(): Don't pass the `user' argument to PrintResults whenbwarsaw2000-11-091-2/+1
| | | | | | the user is successfully unsubscribed. In that case there /is/ no options for the user to continue to edit. Fixes SF bugs 122017 and 121591.
* Fixes for a minor local security hole. Some of the CGI scripts couldbwarsaw2000-09-291-15/+3
| | | | | | | | | | | 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.
* PrintResults(): Add a link back to the user options page on thebwarsaw2000-09-091-32/+55
| | | | | | | | | | results page. Obviates the need for using the `back' button after changing your options. process_form(): Call PrintResults() with the new `user' argument. Catch MMMustDigestError and print a notification that the digest option hasn't been set. Parallels what happens for MMCantDigestError. Closes SF bug #113728.
* Cleanups to fix relative/absolute script url calculation in responsebwarsaw2000-08-011-1/+1
| | | | | | to SF Bug #110753. Specifically, optionslinks() Fix usage of GetOptionsURL() for new interface.
* optionslinks(): Use GetScriptURL(relative=1) for calculating the path.bwarsaw2000-07-251-1/+1
| | | | SF Patch #100556.
* main(): syslog() call needs log file first argument.bwarsaw2000-06-281-1/+1
|
* Convert all uses of sys.stderr.write() and mlist.LogMsg() to the newbwarsaw2000-06-021-1/+2
| | | | syslog() interface.
* process_form(): When listing a user's other subscriptions, don't usebwarsaw2000-06-011-8/+9
| | | | | | | map_maillists() -- which has been removed anyway -- because the locking semantics interacted poorly. optionslinks() has been modified to take a listname instead of a MailList object, and it opens the list unlocked. Good ol' built-in map() is used now instead.
* process_form(): MMListNotReady => MMListNotReadyErrorbwarsaw2000-04-041-4/+4
|
* Some meager consistency in handling errors when trying to open thebwarsaw2000-04-041-4/+7
| | | | | | | | | | | | | | mailing list. In all cases, catch the base exception class MMListError, and output HTML indicating the specified list doesn't exist. A more detail message gets printed to logs/error (the str() of the actual exception details). Also: admin.py - Don't catch MMBadConfigError around mlist.parse_matching_header_opt() since this method doesn't ever raise that exception. Actually, that exception isn't raised anywhere in Mailman, so it's been removed.
* process_form(): Catch MMBadUserError, which can get raised duringbwarsaw2000-03-231-0/+4
| | | | | password confirmation when the user doesn't have a password (and how can that happen?!)
* Update the copyright lines to include the years 1999 & 2000.bwarsaw2000-03-211-3/+1
|
* main(): Handle the case where the environment has no PATH_INFObwarsaw2000-01-211-2/+5
| | | | variable.
* AcknowlegePosts => AcknowledgePostsbwarsaw1999-11-241-2/+2
|
* Some general cleanup of imports, globals (zapped 'em), and a few otherbwarsaw1999-11-111-97/+111
| | | | | | programming constructs. Could still use a lot more work. Make sure the list is always saved and unlocked when exiting.
* Sweeping changes to hopefully and finally (for 1.0 at least) make sanebwarsaw1999-03-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | address case matching. These changes require the DATA_FILE_VERSION to be bumped, which should auto-update your config.db files. I sure hope this works correctly! Details of changes: MailList.GetUserSubscribedAddress(): New method. If the address is a member, this returns the case-preserved address the user is subscribed with. If not a member, None is returned. MailList.GetUserCanonicalAddress(): New method. If the address is a member, this returns the lowercased address the user is subscribed with. If not a member, None is returned. MailList.FindUser(): Wrote down, in a big comment, the constraints for the dictionaries self.members, self.digest_members, self.passwords. This wasn't always followed, but now it should be. FindUser() is now also guaranteed to return the lowercased version of the subscribed email address. This wasn't always the case. FindUser() also provides a shortcut for the common case. ApprovedAddMember(): Guarantee that passwords stored in self.passwords are keyed off the lowercased address. Deliverer.MailUserPassword(): Find the user's password using the lowercased version of their address. However, be sure to use their case-preserved address for the recipient of the password email. Digester.SetUserDigest(): Fixed a fairly old bug where a user switching from regular to digest membership (or vice versa) would get their case-preserved address blown away. I don't think there's any way to recover this information, but at least now we properly save it. SecurityManager.ConfirmUserPassword(): Simplified address matching stuff, since we now guarantee that FindUser() will return a lowercased address, and that the passwords dictionary has lowercased keys. FindUser() will return None if the address isn't found, and it also has a built-in shortcut so that the more expensive FindMatchingAddresses() isn't called in the common case. I eliminated the case-insensitive password comparision that Ken rightly questioned in his comment. admin.py: In the list of members, display a member's case-preserved address instead of their lowercased address. Also, obscure the URL in the hyperlink (probably not terribly necessary). handle_opts.py: When the password can't be found (when emailing it), put the address we tried to find in the result message. Makes for better debugging. options.py: Use a better mechanism for finding if the member has a case-preserved address different from their lowercased address.
* main(): Remove all bare excepts. These now percolate up to the driverbwarsaw1999-03-241-21/+0
| | | | script which does a much better job of reporting the error.
* If the digests are turned off, the results message indicates that thebwarsaw1999-03-091-2/+4
| | | | user may get one last digest.
* main(): Scott had a comment asking whether the check for membershipbwarsaw1999-03-051-12/+9
| | | | | | | should use FindMatchingAddresses(). I think it should, so I've made that change. Also, farther down, just changed some inconsistent indentation.
* Don't use eval() to turn a string into an int, use int() -- it's safer.bwarsaw1998-12-291-26/+19
|
* At the end of main(), catch MMCantDigestError which can occur if thebwarsaw1998-12-231-1/+6
| | | | | | | | | list admin has disabled digests, but the user selects to turn it on. A better solution would be to not present this option to the user in that case. At least now, we give a more meaningful message instead of letting the exception percolate!
* I needed to use the Utils.FindMatchingAddresses() address, rather thanklm1998-12-171-4/+9
| | | | | | the original, for each of the links - and also, needed to used the Utils.ObscuredEmail() version of that, since that's the more common, "normal" form.
* Two tiny refinements to the subscriptions list, and then dinner:klm1998-12-171-3/+6
| | | | | - Add some (barely) explanatory text, and - sort the list of names.
* Use OrderedList instead of UnorderedList for the list ofklm1998-12-171-1/+1
| | | | | subscriptions, so people can, eg, see the number go down as they unsubscribe, etc.
* We needed *something* by which people can determine the lists theyklm1998-12-171-4/+40
| | | | | | | | | | | | | | subscribe to. I'm adding a button on the user options page that they can click, as long as they provide their password, to get to a page of links to the options pages for all their subscriptions on the current system. It's not very pretty (options.py and handle_options.py are even more packed with miscellaneous stuff, and the page they go to is extremely unrefined), but i think it's not bad for an hour hack, and is needed. (The password protection is necessary since the user options page is visible to anyone, and not having a password would give away the list of private subscriptions.)
* Fixed bogus error message: had to few parameters to satisfy formatklm1998-11-241-3/+3
| | | | | string (now using dict substitution, instead), plus the URL was missing quotes, plus the URL was missing 'mailto:'.
* Wrapped a bunch of long lines.klm1998-11-211-8/+12
|
* This change implements storing list members and digest members ascotton1998-11-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dicts instead of lists, which optimizes Utils.FindMatchingAddresses and general membership management, especially for large lists. MailList.py now supplies .GetMembers() and .GetDigestMembers() to supply the data in list form to anything that needs it that way. An new install showed this worked fine with some cursory testing of the cgi's and interactive poking around. A detailed listing of the changes follows: Mailman/Defaults.py.in: change data version to 11 Mailman/Digester.py: initvars now instantiates digest_members as {} instead of [] lines 113-114 and 121-122 now use del This change implements storing list members and digest members as dicts instead of lists, which optimizes Utils.FindMatchingAddresses and general membership management, especially for large lists. MailList.py now supplies .GetMembers() and .GetDigestMembers() to supply the data in list form to anything that needs it that way. Though INSTALL shows up on the changed files section, a diff a few seconds ago didn't show any differences in that file, so I hope nobody changed it in the interim. An new install showed this worked fine with some cursory testing of the cgi's and interactive poking around. A detailed listing of the changes follows: Mailman/Defaults.py.in: change data version to 11 Mailman/Digester.py: initvars now instantiates digest_members as {} instead of [] lines 113-114 and 121-122 now use del list.[digest_]member instead of list.[digest_]members.remove when figuring who to actually send digests to, use list.GetDigestMembers() instead of list.digest_members. Mailman/HTMLFormatter: now uses list.Get[Digest]Members to get subscribers, and length of digested subscribers and regular members MailCommandHandler, SecurityManager,Cgi/handle_opts, Cgi/options: all simple replacements of list.[digest_]members with list.Get[Digest]Members(). Mailman/Cgi/admin.py: mostly simple replacements of list.[digest_]members with the Get..() methods, however, the membership management section now works much quicker and changes digest->nodigest subscriptions via dictionary manipulations. Mailman/versions.py: updates lists to use dicts and changed list.[digest_]members to use the list.Get[Digest]Members() methods. Mailman/Utils.py: added a function "GetPossibleMatchingAddresses" which when fed an address, returns the list of addresses that "smart" address matching would match. changed FindMatchingAddresses(name, list) to use a new signature: FindMatchingAddresses(name, *dicts), where dicts is a list of dictionaries keyed by addresses. Just realized that this would better be FindMatchingAddresses(name, dict, *dicts) so that it enforces atleast 2 args... I'll make that change in a sec. All uses of FindMatchingAddresses have been changed to fit the new arguments. scott ----:**-F1 cvs30458aaa 1:12PM 0.98 Mail (Text Fill)--L59--32%------------------------------------------- ?
* Convert all module names to their new names. Import all modules frombwarsaw1998-06-191-157/+171
| | | | | | | the Mailman package (using the semi-bogus, but quickly implemented from ... import style). main()-ify, but needed a few bogus global decls
* These are the files that used to be in ../cgi, except they no longerviega1998-06-141-0/+207
handle logging to an error file, and no longer import paths. Also, any checks for __main__ have been removed.