| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing unit tests. Here's a summary of the changes.
- Removed all dependent third party packages, since the setup.py file now
claims all package dependencies such that they can be automatically
installed from the cheeseshop.
- Moved the misc directory into the Mailman package as Mailman/data. Moved
templates and messages to Mailman subpackages.
- Added an ILanguageManager interface, plus an implementation, so that
we don't use Defaults.LC_DESCRIPTIONS directly anymore. Added a doctest
for this interface and implementation. Defaults.LANGUAGES is moved into
mailman.cfg. Defaults.LANGUAGE_DICT is moved to _DEFAULT_LANGUAGE_DATA, and
LC_DESCRIPTIONS is removed. The calculation of the available and enabled
languages is moved to the Configuration class, but this will probably still
need work. Utils.GetLanguageDescr() and Utils.IsLanguage() are removed.
I'd like to remove GetCharSet() eventually too, but there are too many uses
of this currently, so I'm deferring it.
- Utils.findtext(): Hacks added so that templates can be retrieved from the
language catalog. The hack is that the template contents are used to find
the translation, but in the one test case where this is actually flexed, the
trailing newline in the file contents has to be trimmed. This is probably
not right.
- No more Defaults.py.in or mm_cfg.py! Defaults.py.in is moved to Defaults.py
and is no longer created from a template file. The script called
make_instance is added which creates an etc/mailman.cfg file from
mailman.cfg.in (previously, mailman.cfg.sample) and /that/ file now has the
small number of calculated values. In general, make_instance will not touch
mailman.cfg if it exists, unless the --force option is given. CGIEXT is
made the empty string by default (i.e. not generated). make_instance grows
a --var-dir option. Fleshed out the --languages opton.
- Defaults.py grows a DEFAULT_VAR_DIRECTORY variable, which is the default
location of the 'var' directory. The Configuration class uses this as one
of the directories it searches for its landmark, i.e. etc/mailman.cfg.
RUNTIME_DIR is gone, as is VAR_PREFIX.
- testall needs to write MAILMAN_USER, MAILMAN_UID, MAILMAN_GROUP,
MAILMAN_GID, and LANGUAGES run time variables.
- bin/withlist no longer needs to add config.BIN_DIR to sys.path, because in
fact that variable doesn't exist any more.
- Tweak the French catalog to make a test work. This is needed because of the
conversion from %-strings to $-strings.
- The setup.py now generates the .mo files before it does its thing. This
will have to be fixed, but for now we must generate these files on setup
build time instead of installation time.
- Removed an unused interface.
|
| |
|
|
|
|
|
|
|
|
|
| |
Ignore mailman.egg-info
In bin/make_instance.py: Catch and ignore import errors when importing
Mailman.i18n. Before this script has actually been run, there won't be enough
infrastructure in place of the import to succeed. Include several other fixes
in this file.
Add install_requires to the setup script.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
traces of our crufty old Syslog. Most of this work was purely mechanical,
except for:
1) Initializing the loggers. For this, there's a new module
Mailman/loginit.py (yes all modules from now on will use PEP 8
names). We can't call this 'logging.py' because that will
interfere with importing the stdlib module of the same name (can
you say Python 2.5 and absolute imports?).
If you want to write log messages both to the log file and to
stderr, pass True to loginit.initialize(). This will turn on
propagation of log messages to the parent 'mailman' logger, which
is set up to print to stderr. This is how bin/qrunner works when
not running as a subprocess of mailmanctl.
2) The driver script. I had to untwist the StampedLogger stuff and
implement differently printing exceptions and such to log/error
because standard logging objects don't have a write() method. So
we write to a cStringIO and then pass that to the logger.
3) SMTPDirect.py because of the configurability of the log messages.
This required changing SafeDict into a dict subclass (which is
better than using UserDicts anyway -- yay Python 2.3!). It's
probably still possible to flummox things up if you change the
name of the loggers in the SMTP_LOG_* variables in mm_cfg.py.
However, the worst you can do is cause output to go to stderr and
not go to a log file.
Note too that all entry points into the Mailman system must call
Mailman.loginit.initialize() or the log output will go to stderr
(which may occasionally be what you want). Currently all CGIs and
qrunners should be working properly.
I wish I could have tested all code paths that touch the logger, but
that's infeasible. I have tested this, but it's possible that there
were some mistakes in the translation.
- Mailman.Bouncers.BounceAPI.Stop is a singleton, but not a class
instance any more.
- True/False code cleanup, PEP 8 import restructuring, whitespace
normalization, and copyright year updates, as appropriate.
|
| | |
|
| | |
|
| |
|
|
|
| |
Also, use Utils.websafe() consistently throughout, instead of the
inconsistent calls to cgi.escape().
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Fixes to prevent cross-site scripting exploits. See
http://www.cert.org/advisories/CA-2000-02.html
Reported by zeno@cgisecurity.com
Fix is to cgi.escape() any strings regurgitated from the url back to
the browser in the html response.
|
| |
|
|
| |
as translatable.
|
| |
|
|
|
|
|
|
| |
mlist.WebAuthenticate() and passing in the authentication contexts.
In this case when the roster is private to members, the authcontext is
the AuthUser, AuthListModerator, AuthListAdmin, and AuthSiteAdmin.
When the context is list-admin only, then the authcontext is
AuthListModerator, AuthListAdmin, and AuthSiteAdmin.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
i18n.set_language() and doc.set_language() to set up the proper
language for the response page.
Also, consistency with other CGI scripts in their use of
"from Mailman.htmlformater import *".
De-string-module-ification.
Other random code cleaning.
|
| |
|
|
| |
Fix some _() wrappings to use local variables.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
syslog() interface.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
bogus email addresses.
|
| |
|
|
|
| |
$PATH_INFO isn't exported into the environment. Handle this the same
as if no list name were given.
|
| |
|
|
|
|
|
|
|
|
|
| |
calculation of html user lists to the roster cgi program.
HTMLFormatter: added a .GetAllReplacements() method that does the same
thing as GetStandardRepplacements() but also calculates all the html
for users lists. Removed the calculation of all the html for the user
lists from GetStandardReplacements().
Cgi/roster.py replaced call of GetStandardReplacements() with
GetAllReplacements().
scott
|
| |
|
|
|
| |
it was causing a password failure after a user password was
satisfactorily verified.
|
| |
|
|
|
| |
the Mailman package (using the semi-bogus, but quickly implemented
from ... import style).
|
|
|
handle logging to an error file, and no longer import paths. Also,
any checks for __main__ have been removed.
|