Attachment 'moin-1.6-qp-password-once3.patch'

Download

   1 # HG changeset patch
   2 # User Thomas Arendsen Hein <thomas@intevation.de>
   3 # Date 1153404286 -7200
   4 # Node ID f77551ea55f743a2d69aa5c1543aafd09d96b838
   5 # Parent  bd54096490d32b4c899bd3f6a41e4df4a028567c
   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 bd54096490d3 -r f77551ea55f7 MoinMoin/mail/sendmail.py
  14 --- a/MoinMoin/mail/sendmail.py	Wed Jul 19 23:51:45 2006 +0200
  15 +++ b/MoinMoin/mail/sendmail.py	Thu Jul 20 16:04:46 2006 +0200
  16 @@ -74,7 +74,13 @@ def sendmail(request, to, subject, text,
  17      charset.header_encoding = QP
  18      charset.body_encoding = QP
  19      msg.set_charset(charset)
  20 -    msg.set_payload(charset.body_encode(text))
  21 +
  22 +    # work around a bug in python 2.4.3 and above:
  23 +    msg.set_payload('=')
  24 +    if msg.as_string().endswith('='):
  25 +        text = charset.body_encode(text)
  26 +
  27 +    msg.set_payload(text)
  28  
  29      # Create message headers
  30      # 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.
  • [get | view] (2006-07-20 14:06:20, 1.2 KB) [[attachment:moin-1.5-qp-password-once3.patch]]
  • [get | view] (2006-07-20 14:06:26, 1.2 KB) [[attachment:moin-1.6-qp-password-once3.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.