| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
it, and we don't have it to start with!
|
| |
|
|
| |
as translatable.
|
| |
|
|
|
|
|
|
| |
allowing the list-admin, list-moderator, or site-moderator access to
the admindb. Also, don't hard code the background color.
handle_no_list(): Clean this up by using Utils.ScriptURL() to give us
the url to the admin overview page.
|
| |
|
|
|
| |
simply pass in the MailList object; maketext() digs the preferred
language out of the list object.
|
| |
|
|
|
| |
that race conditions can't trick us into trying to Save() when we
don't have the list lock.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main(): Set up a signal handler to catch SIGTERM, and unlock the
mailing list when this happens. This has the side effect of aborting
any changes to the MailList object that this web hit may have made.
This is necessary due to semantics of Apache's mod_cgi: when the
browser closes the socket, eventually Apache receives a SIGPIPE (on
output to the closed socket). This causes Apache to SIGTERM the cgi
process, wait three seconds, then SIGKILL it. We want to be able to
clean up the locks, so the best we can do is try to unlock the list on
the SIGTERM. Once we get SIGKILLed, there's nothing we can do.
This change also moves the Save() call into the try: block so that the
finally: block /only/ unlocks the list. Thus, the list gets unlocked
in most situations. There are still race conditions where 1) the
config.db file could be corrupted; 2) list locks could still be
unreleased. Given the semantics of signals in Python, the interaction
of Apache's mod_cgi, and other factors, this is the best we can do,
and it should be better than the old situation.
XXX What do other web servers or cgi execution environments do?
|
| | |
|
| |
|
|
| |
on the subject text is the right thing to use.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At module scope, set the system language to the server's default,
until we know which list this is a request on.
main(): Don't lock the list until absolutely necessary. Also, once
the list is instantiated, set the system language to the list's
preferred language. Once the html results document object is created,
set its language to the list's preferred language too.
HandleRequests() -> process_form()
PrintRequests() -> show_requests()
handle_no_list(): Be sure to set the document's language to the
server's default (since there is no instantiated list at this point).
show_requests(): Support DEFER and DISCARD on subscription requests,
just like as for held posts.
PrintAddMemberRequest(): Inlined and removed.
PrintPostRequest() -> show_post_requests()
show_post_requests(): Convert to using the mimelib interface (it's a
minor shame that we have to reparse the message object to display it
on this page). Watch for mimelib.Errors.MessageParseError's which
could result if the held message is corrupted. If this occurs, we
discard the message, but that may not be the right thing to do.
process_form(): Don't save the MailList object here; that happens in
the finally: clause in main().
Also some minor verbiage and formatting changes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Conversion to mimelib API.
PrintPostRequest(): We must html quote the Subject: text since this
gets displayed in-line in the page. E.g. if you had the following
header in a held message
Subject: </table>
it would royally screw the admindb display. Thanks to Brian Youmans
for first reporting this problem.
|
| | |
|
| |
|
|
|
| |
Fix the Utils.maketext() calls to pass the language in as a keyword
argument.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
pages, we can remove the extra links from the "no pending requests"
information.
|
| |
|
|
|
|
|
|
|
| |
Jeremy Hylton. The `Action:' buttons in horizontal placement are
confusing: does the button go with the word before it or after it?
Hard to tell without scanning the whole line.
Unfortunately, vertical placement takes up too much real-estate. This
compromise puts the buttons underneath the words.
|
| |
|
|
| |
-admin to avoid processing by the bounce subsystem.
|
| |
|
|
|
|
|
|
| |
to SF Bug #110753. Specifically,
PrintRequests(): Use Utils.ScriptURL() instead of GetNestingLevel(),
and GetScriptURL() instead of GetRelativeScriptURL(). Also fix usage
of GetOptionsURL() for new interface.
|
| |
|
|
|
| |
main(): Use the new Mailman.Cgi.Auth module for performing the
authentication stuff.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
handles all the tasks of authentication. It returns 1 if auth
succeeded, 0 if it failed. On failure it also prints the admin login
page, so main() should just exit.
Note: authenticate() here is slightly different than the function in
admin.py, but they should be folded in together since they largely do
the same work.
PrintRequests(): No need to pass in the cgi data, since it isn't used
in this function.
|
| |
|
|
| |
Ron Jarrell.
|
| | |
|
| |
|
|
|
| |
parameter to RadioButtonArray() constructor, and use the new symbolic
constants instead of the hardcoded values.
|
| |
|
|
| |
message id was lost.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
places. For held subscriptions, the displayed order of `subscribe'
and `refuse' is changed so that the refused button is right next to
the refusal explanation.
After suggestions by many people, split the headers and body into
different textboxes for held messages. Before held messages often got
truncated in their headers, and the bodies couldn't be seen.
Instead of providing a button to view the entire message (which would
be more difficult to implement through the admindb authentication
blockade), it is now possible to forward the message to a given
address. This defaults to the <listname>-admin address. Use this
combined with the new `Defer' action to get a copy of the full message
for review before deciding what to do with it.
In addition to the new `Defer' action, held messages can be
`preserved' for the site admin by copying the message to the
$PREFIX/spam directory. This is useful for abusive messages that need
closer or long term scrutiny.
Message rejection notices are taken from the
msgdata['rejection-notice'] value, placed their by the Hold.py
module.
|
| |
|
|
| |
button is just to the left of the refusal-reason text box.
|
| |
|
|
| |
syslog() interface.
|
| |
|
|
| |
length 5 or length 6.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
instead of getting handed it from the requests database. If we can't
open the file for reading, the message was lost, so print an
information message and tidy up the housekeeping (this last is a bit
of a kludge though).
|
| | |
|
| |
|
|
|
| |
HandleRequests(): Catch MMAlreadyAMember errors and print something
sensible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(i.e. ListAdmin.py). Also several changes to the layout of request
pages that I think make using them much nicer.
- There's a preamble which actually explains what you're supposed to
do on this page.
- There's only two "Submit All Data" buttons. I found the multiple
submit buttons just too darn confusing (hard to explain == hard to
use). Guido concurred.
- The tables have no cellpadding so they aren't as spread out.
- Each posting hold tells you "N of #" so you know how many more are
shown below.
- Layout of posting holds has changed so you see immediately 1) who
it's from; 2) why the message was held; 3) what the subject of the
message is. Next you see the action buttons, followed by the
explanation text box. Finally you see the full text of the message
in a separate text box. This should make handling extremely long
messages much easier because they don't clutter up the main page too
much.
Also, Guido had an excellent suggestion: Let the admin edit the full
text of the message in this box! Probably wouldn't be to hard to
do, actually.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* New method WebAuthenticate(). Takes up to three keyword arguments:
user-address, password and cookie-suffix. If password is supplied
(and authenticates OK), issue a cookie -- otherwise try to do
authentication based on cookies.
* MakeCookie(): Changed to actually return a finished Cookie object.
Takes one (non-optional) argument; the created cookie's name.
Fixed bug in setting of cookie's path.
* CheckCookie(): Now takes cookie's name as single argument, and can
raise various MMAuthenticationErrors if that cookie doesn't
authenticate OK.
admin.py: Do explicit re-authentication when changing list admin
password.
admin.py, admindb.py and private.py: Removed isAuthenticated()
function -- use MailList.WebAuthenticate() instead. This removed
the need to import Cookie, so now we don't.
|
| |
|
|
|
|
|
|
|
| |
SecurityManager: New functions MakeCookie() and CheckCookie(). These
functions work with cookies containing cookie creation and expire
time, the client's IP number, and a checksum hash of these values as
well as a secret (the lists (encrypted) admin password).
admin.py, admindb.py and private.py: isAuthenticated now uses these
new cookie functions.
|
| |
|
|
|
|
|
|
|
| |
always (repeatedly!) type in. This means that admins are going to
have to erase the message if they're rejecting for a different reason
- but the vast proportion of messages i reject are for this reason,
while for spammers i often discard, and who cares if they get a
confusing message, anyway?
Refined a few error messages ("intenting to visit"?).
|
| |
|
|
|
|
|
|
| |
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!))
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
added to script path.
|
| |
|
|
| |
cut-and-paste error (found by Balazs Nagy).
|
| |
|
|
|
| |
list, and not have a `value' attribute. Don't try to int()ify them if
so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
admindb assumed that there was the environmental variable
"PATH_INFO". If there is not, as would be the case if someone
visited <base-url>/admindb, then it would throw a key error.
Now it says that the user should specify a list name.
scott
|
| | |
|
| |
|
|
| |
list.NumRequestsPending() (missed this one when i made the change).
|
| |
|
|
| |
NameErrors.
|
| |
|
|
|
|
|
| |
the Mailman package (using the semi-bogus, but quickly implemented
from ... import style).
main()-ify, but needed a few bogus global decls
|
|
|
handle logging to an error file, and no longer import paths. Also,
any checks for __main__ have been removed.
|