Attachment 'moin-1.5-qp-password-once3.patch'
Download
Toggle line numbers
1 # HG changeset patch
2 # User Thomas Arendsen Hein <thomas@intevation.de>
3 # Date 1153404270 -7200
4 # Node ID 29fb44b4d581753fb4ea7240d5f33b7dc9cf006d
5 # Parent 48776e1e3ea410dd3358ef4bf832108403b63f86
6 fix double quoted-printable encoding in forgotten password email.
7 Double encoding was introduced by 50c7a0cc1791.
8 Discussed on MoinMoinBugs/ResetPasswordEmailImproperlyEncoded.
9
10 The problem was caused by a bug in python 2.4.3 and above, which doesn't
11 QP-encode the message as previous versions do it.
12
13 diff -r 48776e1e3ea4 -r 29fb44b4d581 MoinMoin/util/mail.py
14 --- a/MoinMoin/util/mail.py Thu Jul 20 12:02:01 2006 +0200
15 +++ b/MoinMoin/util/mail.py Thu Jul 20 16:04:30 2006 +0200
16 @@ -74,8 +74,14 @@ def sendmail(request, to, subject, text,
17 charset = Charset(config.charset)
18 charset.header_encoding = QP
19 charset.body_encoding = QP
20 - msg.set_charset(charset)
21 - msg.set_payload(charset.body_encode(text))
22 + msg.set_charset(charset)
23 +
24 + # work around a bug in python 2.4.3 and above:
25 + msg.set_payload('=')
26 + if msg.as_string().endswith('='):
27 + text = charset.body_encode(text)
28 +
29 + msg.set_payload(text)
30
31 # Create message headers
32 # Don't expose emails addreses of the other subscribers, instead we
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.