| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
page, which possibly could contain &#XYZ; entities, and convert the
string to a Unicode string using the charset of the language provided
in the argument list. As a practical kludge, if the charset is
us-ascii, we'll use iso-8859-1 instead (which allows a larger number
of non-ASCII names in English lists).
uncanonstr(): The opposite (sorta) of canonstr(), this takes a Unicode
string and returns the encoded string in the charset of the provided
language. If a strict conversion fails, then 8-bit characters are
converted to their &#XYZ; entities.
|
| |
|
|
| |
language keys, but we already have that information in LC_DESCRIPTIONS.
|
| | |
|
| |
|
|
| |
date in (year, month, day) format.
|
| |
|
|
|
| |
Also, use Utils.websafe() consistently throughout, instead of the
inconsistent calls to cgi.escape().
|
| |
|
|
|
| |
environment. This closes a cross-site scripting hole in the admin
login pages.
|
| |
|
|
| |
are not used any where.
|
| | |
|
| |
|
|
|
| |
on body lines. Also, add `confirm' as an administrivia test. Closes
SF bug #454857.
|
| |
|
|
|
| |
Utils.list_exists(), Utils.list_names(): Don't use LIST_DATA_DIR
directly, instead use Site.get_listpath() and Site.get_listnames().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ValidateEmail(): Add Dan Mick's suggestion to throw out email
addresses with embedded spaces in the (although the calculation of
such is done a bit differently). This may not be a complete solution
because any address that's first sent through email.Utils.parseaddr()
will have embedded spaces collapsed anyway by rfc822.py's similarly
named function. That latter is a bug that needs to be fixed in
Python, but that's not a high priority right now. Also note that
"this is an email address"@dom.ain is (probably) legal and is handled
correctly by parseaddr() but will still be rejected by
ValidateEmail(). I think that's fine, as anybody who's got embedded
spaces in their address is probably going to have a miserable life
anyway.
to_dollar(), to_percent(), dollar_identifiers(),
percent_identifiers(): New functions to support experimental $-string
substitutions, and conversions between %-strings and $-strings.
|
| |
|
|
|
| |
other search location, use templates/en/* since we know the English
template must always exist!
|
| |
|
|
|
| |
because SecurityManager now may want the actual site password, for
(optionally) setting a site cookie.
|
| |
|
|
| |
API so that the leading dash on extra shouldn't be included.
|
| | |
|
| |
|
|
| |
in the dict to lowercase (yes they must be strings).
|
| | |
|
| |
|
|
|
| |
Also, use cStringIO directly instead of our own hack-around StringIO
module.
|
| |
|
|
|
|
|
|
|
|
| |
DEFAULT_URL_PATTERN and interpolate in the calculated web-request
based host name (via get_domain()). This should improve vhost
support.
get_site_email(): Calculate hostname by looking up get_domain()
results in VIRTUAL_HOSTS, defaulting to get_domain() if no vhost
information was set.
|
| |
|
|
| |
to be inside the character-set.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
ValidateEmail(): Add `/' to the list of _badchars in email addresses
instead of making it bad only if it points to an existing directory
(!).
ParseAddrs(): Removed since rfc822.parseaddr() now works for all
cases, according to RFC 2822 (but we'll need to supply the rfc822.py
from Python 2.2 now).
|
| | |
|
| |
|
|
|
| |
ValueError too. This can happen if there's a typo in the template
such that a bogus format character appears (e.g. %(blah)y).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
function now takes an additional optional argument `mlist' which must
be a MailList object. It implements an expanding search order for a
specific template file: list-centric, domain-centric, site-centric,
global default. Each of these prefixes in turn the explicit language
passed as an argument, then the list's preferred language, then the
site's default language. The first matching template file found is
returned.
mkdir(): Removed. Use os.mkdir() instead.
|
| |
|
|
|
| |
the os.waitpid() call. This means there are no children left so we
can just clear the dictionary and return.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument `siteadmin' which if true reads the SITE_PW_FILE (default is
true). When false, it reads the LISTCREATOR_PW_FILE.
CheckSiteAdminPassword() -> check_global_password(): Same addition of
argument.
rmdirhier(): Like "rm -r" and unlike os.removedirs(), this recursively
deletes everything under a specified directory.
get_domain(): Returns the URL hostname/domain as pulled out of
HTTP_HOST or SERVER_NAME, and is VIRTUAL_HOST_OVERVIEW aware.
|
| |
|
|
|
| |
the deprecated regsub so as to quiet a Python 2.1 warning. The
standard cgi.escape() function does all this for us.
|
| | |
|
| |
|
|
|
| |
inhibits wrapping of paragraphs with leading whitespace. When false,
all paragraphs are wrapped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for the source string to cause exceptions, e.g. if we try to do
'%(hello)f' % {'hello': 'world'}
so catch any TypeError and just feed them the raw, uninterpolated
template.
GetCharSet(): Require a `lang' argument in lieu of using
os.environ['LANG'] to pass around this information. Note, this change
may cause some temporary breakages.
|
| |
|
|
|
|
| |
maketext(): If the language specific template file doesn't exist, fall
back to using $MM/templates. This helps with bootstrapping but may
not be the correct long term solution.
|
| |
|
|
|
| |
the trailing newline actually left nothing but the trailing newline!
Caught by Ron Jarrell.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
De-string-module-ification. Move SafeDict out of this file. Remove
the Crypt stuff, using sha instead.
SetSiteAdminPassword(), CheckSiteAdminPassword(): Use sha to write the
new admin password. Check...() doesn't attempt to compare the
challenge against the crypt'd password if the sha comparison fails
because the site admin password is much easier to change than all the
list passwords.
IsAdministrivia() -> is_administrivia(), and mimelib-ify
open_ex(): Removed
reap(): Additional optional argument `once' which says to just go
through the waitpid main loop once.
hexlify/unhexlify crud removed (Python 2.0's got them in its binascii
module).
GetDirectories(), GetLanguageDescr(), GetCharSet(): Added for i18n
support.
|
| |
|
|
|
| |
use. Maps to the language-specific subdirectory within the template
directory.
|
| |
|
|
| |
better.
|
| |
|
|
|
|
|
| |
DEFAULT_URL end in a slash causes problems. The default value for
web_page_url argument is now None, and if it's found to be None in the
body of the function, it's set to mm_cfg.DEFAULT_URL (and coerced to
always end in a slash).
|
| |
|
|
|
| |
suited in Utils than in the SecurityManager class because they don't
require the MailList object at all.
|
| |
|
|
|
|
|
|
| |
change the semantics for the most common situation: splitting the
$PATH_INFO environment variable into components for the cgi scripts.
ScriptURL(): This was the only non-CGI use of GetPathPieces() so now
this just uses the filter() call instead of the new semantics.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#114136, Jitterbug PR#159, this changes the password generation scheme
to use more mnemonically friendly syllables. Passwords are composed
of only lower case letters, are lengthened to 6 characters, and should
still be meaningfully hard to crack.
Examples:
doangu
siabdo
poesza
unorbi
ziurag
okasho
ahhuoz
idcaih
efkoex
zubasu
nukiis
igoffa
veehef
ogkuoc
adebab
ovtoci
veixep
amodbo
|
| |
|
|
| |
implementations of hexlify and unhexlify from the binascii module.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
response to SF Bug #110753. Specifically,
GetNestingLevel(): removed
ScriptURL(): New utility function to calculate relative and absolute
urls. The basic approach is this:
1. figure out where we are by using REQUEST_URI or
SCRIPTNAME+PATH_INFO if that isn't defined in our environment.
2. figure out what the Mailman base url is by taking the `path'
component of a urlparse() of the list's web_page_url configvar
or DEFAULT_URL if that isn't provided in the arguments.
3. calculate what the relative path is from where we are to
baseurl; express this as a string of ../'s
4. tack on the relative url to where we want to go, i.e. the
target
Elaborations: Optional `absolute' if set always calculates the
absolute url as web_page_url/DEFAULT_URL + target. absolute should
only be set when generating urls for emails.
mm_cfg.CGIEXT is always tacked onto the end, meaning target is
supposed to be just the script name and nothing else (anything else
should be concatenated onto the return value of this function).
|
| | |
|
| |
|
|
|
|
| |
output file, whether a trailing newline should be printed, and the
separator string. (Sidenote: this is partly to play with some
suggestions currently being floated on the python-dev mailing list).
|
| |
|
|
| |
twice faster.
|
| |
|
|
| |
performance improvements.
|
| |
|
|
| |
and decoding.
|
| |
|
|
| |
disgusting hack).
|