| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
cookie Subject: header the same way we do for ChangeMemberAddress().
That is, we can't set this header in the UserNotification constructor,
but have to add it in afterwards, so the header doesn't get encoded (a
reply to the encoded confirm header will bollux up
MailCommandHandler).
|
| |
|
|
|
|
|
|
|
|
|
| |
already sets the Content-Type: and MIME-Version: headers, don't do it
explicitly (it'll add multiple headers). Instead just call set_type()
to set the type to multipart/mixed. (Must do that before attempting
to attach.)
sendNextNotification(): Because we do not want the Subject: to be
encoded, don't pass the subject into the UserNotification
constructor. See MailList.ChangeMemberAddress() for details.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UserNotification constructor so that the verification message gets
encoded correctly. There's one gotcha that affects all confirmation
messages (and I will audit this next). From the comment:
# BAW: We don't pass the Subject: into the UserNotification
# constructor because it will encode it in the charset of the language
# being used. For non-us-ascii charsets, this means it will probably
# quopri quote it, and thus replies will also be quopri encoded. But
# MailCommandHandler doesn't yet grok such headers, and I'm avoiding
# fixing that until a future version which will completely rewrite the
# mail command handling. So, just set the Subject: in a separate
# step, although we have to delete the one UserNotification adds.
Sigh.
|
| |
|
|
|
|
| |
to the user in his/her own language, but as this may be different than
the list's preferred language, we have to wrap the message creation in
a try/finally which sets and restores the list's language.
|
| |
|
|
|
|
|
|
| |
alias field against. Also, send all alias file change requests to
mailman-owner (actually the site email's -owner address) so that it
has a better chance of getting to a human. Finally, in the
UserNotification constructors, use the DEFAULT_SERVER_LANGUAGE (hmm, I
wonder if this should use the language of the site list?).
|
| |
|
|
|
|
|
| |
Content-Type: header, and since we should be setting the charset
anyway, on the message that goes to the admin, set the lang argument
to the UserNotification, and then just set the type (via set_type())
to multipart/mixed.
|
| |
|
|
|
|
|
|
|
| |
there was a lang argument given, call self.set_charset() instead of
doing nothing. Note that when a text argument is given, set_charset()
is called implicitly by set_payload().
Otherwise, given lang but no text results in no MIME-Version: header
being set.
|
| |
|
|
|
|
|
|
|
|
|
| |
UserNotification constructor calls were passing in the language as a
positional argument, in the position where the text should have been.
But because both instances has no text, the proper fix is to use the
`lang' keyword argument.
This fixes one i18n related crash, and the last one I'm going to
commit tonight. I've audited all the other UserNotification call
sites and there are more fixes coming down the pike.
|
| | |
|
| | |
|
| |
|
|
|
| |
also add a sanity check for any regular expressions (i.e. make sure
that re.compile() doesn't fail on them).
|
| |
|
|
|
|
|
|
|
|
|
| |
Change all calls of add_error_message() to doc.addError().
main(): Fix the error reporting when no email address is given. Also,
rework the error reporting for when the login page's unsub or remind
buttons are used. Specifically, when rosters are public, we should
provide error messages when the given address is not a member, but
when rosters are private, lie about the confirmation message or
password reminder.
|
| |
|
|
| |
change the call sites accordingly.
|
| |
|
|
| |
the most commonly used tag.
|
| |
|
|
|
|
|
|
| |
list that's already locked, e.g. the site list that we know we're
processing for! Bug reported by Dan Mick.
BAW: The loop in these two methods should really be factored out, but
there's a bit of an impedance mismatch for the inner logic.
|
| |
|
|
|
|
|
| |
target for harvesters, and we have doubts as to how much this feature
is used.
Note: this does not change anything for existing lists.
|
| |
|
|
|
| |
was sent out or not. This lets the admin page for example, display a
nice status message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mailman/Gui/GUIBase.py module.
get_item_gui_value(): The gui component API has changed; use
getValue() instead of GetValue().
change_options(): We can really simplify a lot of this method because
the actual changing of the properties, value verification, and special
overrides are now all handled in the gui components themselves. We
now need only call out to the gui.handleForm() method.
Eventually, the membership management page should use the same
mechanism.
|
| |
|
|
|
| |
package scope. Delete it, because it messes up the automatic
instantiation policy in MailList.InitTempVars().
|
| |
|
|
|
| |
_setValue(): New overridden method which handles the special "do
immediately" attribute.
|
| |
|
|
|
| |
HandleForm() -> handleForm(). Also, if a topic definition is rejected
for being incomplete, add an error message to the page.
|
| |
|
|
|
| |
_setValue(): New overridden method which handles the special case when
ALLOW_OPEN_SUBSCRIBE is set.
|
| |
|
|
| |
HandleForm() -> handleForm()
|
| |
|
|
|
|
|
|
|
| |
HandleForm(): Remove, obsolete API. Also removed handle_form() module
global.
_setValue(): New overridden method for handling the conversion from
$-strings to %-strings and doing substitution variable verification.
Most of the functionality is in the base class now.
|
| |
|
|
|
| |
_setValue(): New overridden method which handles setting the global
i18n context when the list's preferred_language changes.
|
| |
|
|
|
|
| |
_setValue(): New overridden method which handles the assertion that
the real_name attribute may differ from the internal name by case
only.
|
| |
|
|
|
|
|
| |
HandleForm(): Remove, obsolete API.
_setValue(): New overridden method which handles the special "do
immediately" attributes.
|
| |
|
|
|
|
|
|
|
| |
HandleForm(): Remove, obsolete API. Also remove __convert() as obsolete.
_setValue(): New overridden method converting the bounce values from
the web presentation units to the internal units.
GetValue() -> getValue()
|
| |
|
|
|
|
|
|
| |
HandleForm(): Remove, obsolete API.
_setValue(): New overridden method for handling the conversion from
$-strings to %-strings and doing substitution variable verification.
Most of the functionality is in the base class now.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
plain text instead of msg.__str__(), otherwise we'll get the Unix
From_ header in the output, which will bollux up NNTP. Bug discovered
and fix verified by Ron Jarrell.
|
| |
|
|
| |
presence is enough to avoid archiving the message.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attributes into a special method which does some sanity checking on
the interpolation strings. First, it checks to see if we're using the
new experimental $-strings, and then depending on the style of
interpolation being used, it extracts the identifiers (variables) in
the string and compares them against a known valid list. Any invalid
variables are flagged and the changes are discarded. If the user
simply left off a trailing `s' (as in %(foo)s), then this can be
corrected, but a warning is still printed.
Note: In NonDigest.py we're using a module level function which is
imported by Digest.py's HandleForm(). Makes it convenient to share
code, but this should really be refactored along with
Autoresponse.py's HandleForm().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to not include the %()s chrome. We might be using the new
experimental $-strings. This leaves the instructions with a something
left to be desired, but it should be okay for now, and I don't want to
add two descriptions, one for %-strings and another for $-strings.
HandleForm(): We break the handling of the Autoresponse attributes
into a special method which does some sanity checking on the
interpolation strings. First, it checks to see if we're using the new
experimental $-strings, and then depending on the style of
interpolation being used, it extracts the identifiers (variables) in
the string and compares them against a known valid list. Any invalid
variables are flagged and the changes are discarded. If the user
simply left off a trailing `s' (as in %(foo)s), then this can be
corrected, but a warning is still printed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
use_dollar_strings, this means the list has been converted from the
traditional (and error prone) %-substitution strings to the new
experimental $-substitution strings. We need to internally convert
the $-strings back into (safe) %-strings to utilize Python's string
mod operator.
process(): Apply Ben Gertzfield's patch to only add the header via
text/plain concatenation when the character set of the list's default
language matches the charset of the message.
|
| |
|
|
|
|
|
|
| |
use_dollar_strings, this means the list has been converted from the
traditional (and error prone) %-substitution strings to the new
experimental $-substitution strings. We need to internally convert
the $-strings back into (safe) %-strings to utilize Python's string
mod operator.
|
| |
|
|
| |
longest alias. Also, there's no need to add 1 to the field size.
|
| |
|
|
| |
and -leave respectively.
|
| |
|
|
|
|
|
|
| |
the modules are now unnecessary because we're going to require at
least Python 2.1.x and it should have relatively bug-free versions of
these modules. Second, if we find we need to override standard
modules, we have a different way of doing it now (by path-hacking in a
pythonlib directory one level up into the front of sys.path).
|
| |
|
|
|
|
|
| |
displaying so that nasty HTML can't sneak in. Also, set the readonly
attribute to true when creating the Message Headers and Message
Excerpt text boxes. This avoids the misperception that you can edit
the message before it's approved.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
replacement for the function in the admin.py module. This makes it
much easier for gui component HandleForm() methods to add an error or
warning to the admin page.
TextArea.__init__(): Add a `readonly' argument, which translates to
the TEXTAREA tag getting a READONLY attribute. We'll use this to turn
the header and body excerpt text boxes in the admindb pages to
read-only (avoiding the common misperception that you can edit the
message before it's approved).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
they have a _charset attribute, adding a default one if not. This
should fix a problem I think Dan Mick had, which I believe is caused
by a Message object being pickled w/ version 0.96 of the email
package, and unpickled by 0.97/1.1 of the email package.
Why doesn't this go into email.Message.Message? Because I don't want
to clutter its code up with something that should both be transient
and assumes that Message is pickled. Mailman seems more responsible
for the pickle consistency (if every Python class that grew an
attribute had to have such schema migration code, we'd be up sh*ts
creek).
|
| |
|
|
|
| |
Mailman/pythonlib subdirectory in favor of an alternate location
when/if necessary.
|
| | |
|
| |
|
|
|
|
| |
our Mailman/pythonlib version. We don't use the extra hack in our
version anyway, AFAICT (i.e. the addition of a seek() method which
just deferred to the underlying file object).
|