summaryrefslogtreecommitdiff
path: root/Mailman/Cgi
Commit message (Collapse)AuthorAgeFilesLines
...
* main(): Catch MMNotAMemberError on ConfirmUserPassword() to catchbwarsaw1999-04-281-1/+2
| | | | bogus email addresses.
* Catch Errors.MMNoSuchUserError when unsubscribing, so that alreadyhmeland1999-04-211-3/+11
| | | | | | unsubscribed addresses doesn't generate tracebacks. Failed unsubscribes are listed on the top of the admin page generated after submitting.
* isAuthenticated(): Catch MMNotAMemberError and return 0bwarsaw1999-04-041-1/+2
|
* Make sure list_name is not an empty string or None (a.k.a. "false")bwarsaw1999-03-291-2/+5
|
* Sweeping changes to hopefully and finally (for 1.0 at least) make sanebwarsaw1999-03-293-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* FormatMembershipOptions(): To reflect the change that Ken recentlybwarsaw1999-03-241-4/+5
| | | | | | made, we now change the `norcv' option to be `notmetoo'. This is still backwards, but changing the sense of this option is to much work right now. `norcv' is accepted as an alias for `notmetoo'.
* FormatMembershipOptions(): Minor rewording of the `hide' legend entrybwarsaw1999-03-241-2/+2
|
* FormatMembershipOptions(): Two small changes. First, hyperlink thebwarsaw1999-03-241-13/+22
| | | | | | | | user's address, which jumps you to their member info page. Second, reorder the items in the table so that digest comes just before plain. Didn't make sense to separate these two digest related items.
* Don't know how this snuck by, at least a few versions: "bottom at theklm1999-03-161-9/+12
| | | | | | | | | | | | bottom" => "button at the bottom". Sounds somehow obscene the other way, but nonetheless we'd like it to make sense. While i was here i did a few *more* trivial things... Using "not metoo" instead of "norcv" for member's status column headings (and legend), to disambiguate from "nomail"! (I think i recall "metoo" from things like /bin/mail, in any case, it's a lot more descriptive of the intention.) While i'm here i centered all the checkbuttons, which i think looks a lot tidier.
* The password stuff was removed from all but the general page, so iklm1999-03-161-3/+6
| | | | | changed the message so it only says it's at the bottom of the page when it really is.
* Including the total number of members and the display chunk size in theklm1999-03-151-1/+9
| | | | members table [and testing the emailing of this checkin message, as well].
* Provide a tad more space for the administrator to explain why aklm1999-03-101-1/+1
| | | | | | | | posting is being rejected. (This enables them to explain the right place to send administrivia, for example.) ((Barry - i know these are niggly little things - it's all i have time for. I just want to mention that i'm really greatful that you've been taking care of as much of the substantial stuff as you've been doing!))
* Before trying to ObscureEmail the case-preserved username, be surebwarsaw1999-03-091-2/+4
| | | | it's a string.
* FormatConfiguration(): Only put the FormatPasswordStuff() on thebwarsaw1999-03-091-1/+2
| | | | `general' category page. The others are just too noisy.
* If the digests are turned off, the results message indicates that thebwarsaw1999-03-091-2/+4
| | | | user may get one last digest.
* handle printing of any case-preserved address differently (put thebwarsaw1999-03-091-2/+7
| | | | whole message as <MM_Case-Preserved-User> replacement).
* split a long linebwarsaw1999-03-091-1/+2
|
* Gross and digusting kludge to show the case preserved address for thebwarsaw1999-03-081-65/+68
| | | | | user (if different than their lowercased address). This could be done better if lists didn't have their own copies of options.html :-(
* 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.
* Utils.GetRequestURI(): New function, returns the full virtual path thehmeland1999-03-022-3/+3
| | | | | | | | | | calling CGI script was invoked with. Uses (non-standard, but convenient) environment variable REQUEST_URI when available, otherwise SCRIPT_NAME and PATH_INFO (which are part of the CGI/1.1 spec) if available, or simply returns optional argument `fallback' (which defaults to None). Cgi/admin.py, Cgi/admindb.py: Use it when generating admin authentication page.
* FormatListinfoOverview(): take care of special cases where CGIbwarsaw1999-02-281-1/+2
| | | | extension needs to be added to script path.
* main(): take care of special cases where CGI extension needs to bebwarsaw1999-02-281-2/+2
| | | | added to script path.
* main(), FormatAdminOverview(): take care of special cases where CGIbwarsaw1999-02-281-3/+4
| | | | extension needs to be added to script path.
* FormatListinfoOverview(): strip the port number off of HTTP_HOST if itbwarsaw1999-02-231-4/+5
| | | | is present.
* VERSION is no longer set in configure because it's too hard tobwarsaw1999-01-151-2/+0
| | | | | | | | | | | | propagate version string changes to the public (you have to autoreconf, then reconfigure and reinstall). Now, VERSION is set directory in Defaults.py.in and the Release.py script updates that file directly. Now we just need to run ./config.status and do a re-install. I hope this will make things easier. I'm also bumping the version to 1.0b8, so I can do a release tomorrow.
* main(): when crafting the admlogin.txt and there's no REQUEST_URI, fixbwarsaw1999-01-091-1/+1
| | | | cut-and-paste error (found by Balazs Nagy).
* ChangeOptions(): In `subscribees' section, ValidateEmail() now handlesbwarsaw1999-01-091-9/+2
| | | | | catching blank lines, so we can (mostly) get rid of the special treatment here.
* GetValidValue(): Use new ValidateEmail() interface andbwarsaw1999-01-091-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.
* main(): in previous VARHELP workaround, QUERY_STRING could exist butbwarsaw1999-01-091-3/+4
| | | | be an empty string.
* HandleRequests(): the entries in the FieldStorage `form' could be abwarsaw1999-01-091-1/+4
| | | | | list, and not have a `value' attribute. Don't try to int()ify them if so.
* main(): Kludge-around for accessing variable details when cookies arebwarsaw1999-01-081-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.
* Minor reformattingbwarsaw1999-01-081-4/+4
|
* FormatMembershipOptions(): Changes to the table that gets built tobwarsaw1998-12-301-8/+28
| | | | | | make it much more readable. First, use bare checkboxes and column headers for what used to be the checkbox labels. Put a border around the table. Add a legend for what the column headers mean.
* In `subscribees' section, parse address through Utils.ParseAddrs() sobwarsaw1998-12-301-0/+1
| | | | | the success notification specifies the address instead of any other goo.
* ChangeOptions(): Rework the test for empty or whitespace-only blankbwarsaw1998-12-291-8/+18
| | | | line in mass subscribe dialog. The old way didn't really work.
* FormatListListinfo(): Small tweak to make the email addr entry box 30bwarsaw1998-12-291-1/+1
| | | | chars wide instead of 20.
* GetValidValue(): Fixed small bug in return value of mm_cfg.Numberbwarsaw1998-12-291-0/+1
| | | | converter
* Don't use eval() to turn a string into an int, use int() -- it's safer.bwarsaw1998-12-292-27/+24
|
* GetValidValue(): Zap another case of eval() for string->number conversion.bwarsaw1998-12-291-7/+11
|
* GetValidValue(): Don't use eval() to turn a string into an int, usebwarsaw1998-12-291-4/+3
| | | | int() -- it's safer.
* get_list(): Watch out for no trailing slash on the URL, in which casebwarsaw1998-12-271-1/+5
| | | | | $PATH_INFO isn't exported into the environment. Handle this the same as if no list name were given.
* Fixed bugs that occur when no list name is given in the URL.bwarsaw1998-12-271-45/+50
| | | | | | | | | | | | | | | | | | | | Also, several stylistic fixes: - ArchiveFilter() need not be nested - Don't use eval(str) to convert a string to an integer; it's slower and less safe than using int(str), but be sure to catch ValueError which might result when a bad string is given. - Note to anyone writing Mailman/Cgi scripts! Nothing but imports should happen as a side effect of importing this module. Run everything from inside a main() function (see scripts/driver for details). - get rid of unnecessary imports - Fix #! line, even though this script isn't typically run from the command line.
* 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!
* AMK says:bwarsaw1998-12-191-13/+27
| | | | | | | | | | "Here's a patch to private.py which makes it 1) return text/plain as the content type if the file ends in .txt, and 2) look for <filename>.gz if <filename> doesn't exist, and uses the gzip module to read it." Minimally tested, since I've got Pipermail installed. Doesn't seem hurt.
* Reorganize administrator authentication so that it is done up-frontbwarsaw1998-12-191-77/+132
| | | | | | | | | | | | | | | | instead of on each pending message. Two advantages: you can't even see the held messages if you don't have the password, and it's also easier to deal with the held messages this way. Two nasty bits: most of the code was copied from admin.py, so there's a lot of crufty duplication of effort (but then, all the CGI stuff could go through a major cleaning). Also, if there are no messages being held, that information is given without need for admin password. That seems innocuous enough. Also got rid of a couple of eval()s lurking in the code. I think they were just there to do string->int conversion, and there's a much safer way of doing this.
* 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.
* Password box and button to handle new list-my-subscriptions option.klm1998-12-171-8/+14
|