Make WordPress Core

Opened 17 years ago

Closed 9 years ago

#5252 closed defect (bug) (wontfix)

base64-encoded post-by-email post garbled.

Reported by: kallewoof's profile kallewoof Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Mail Keywords:
Focuses: Cc:

Description

When posting-by-email, my cellphone submits code using "content-transfer-encoding: base64". The message appears (output from wp-mail.php) like so:

Author = [my email] <p><p><b>Content-type:</b> text/plain, <b>Content-Transfer-Encoding:</b> base64, <b>boundary:</b> </p>
<p><b>Raw content:</b><br /><pre>SnVzdCB0ZXN0aW5nIHBvc3RpbmcgZnJvbSBteSBjZWxsLiBTdHJ1Y2sgbWUgd2hpbGUgcmVh
ZGluZyAgUmFwaCBLb3N0ZXIncyBwb3N0cyBhYm91dCB0aGUgZmlyZXMgaW4gQ2FsIHRoYXQg
YmVpbmcgYWJsZSB0byBwb3N0IHRvIHlvdXIgYmxvZyBmcm9tIGEgY2VsbHBob25lIGlzIGEg
dXNlZnVsIGZlYXR1cmUuIA==</pre></p>
<p><b>Author:</b> 1</p>
<p><b>Posted title:</b> =?utf-8?B?Q2VsbHBob25lIHBvc3RpbmcgaW4gV1A=?=<br />
<b>Posted content:</b><br /><pre>SnVzdCB0ZXN0aW5nIHBvc3RpbmcgZnJvbSBteSBjZWxsLiBTdHJ1Y2sgbWUgd2hpbGUgcmVh
ZGluZyAgUmFwaCBLb3N0ZXIncyBwb3N0cyBhYm91dCB0aGUgZmlyZXMgaW4gQ2FsIHRoYXQg
YmVpbmcgYWJsZSB0byBwb3N0IHRvIHlvdXIgYmxvZyBmcm9tIGEgY2VsbHBob25lIGlzIGEg
dXNlZnVsIGZlYXR1cmUuIA==</pre></p><p>Mission complete, message <strong>1</strong> deleted.</p>

The provided patch detects base64-encoded content transfers and base64_decodes them. For some reason (I'm no utf8-expert) the TITLE of the post has "=?utf-8?B?" prepended to the actual base64 content (see above), which means a check for this string + a cropping is needed or base64_decode will not decode the post title properly.

Attachments (1)

wp-mail-base64-patch.diff (1023 bytes) - added by kallewoof 17 years ago.
wp-mail.php patch for base64 encoding

Download all attachments as: .zip

Change History (8)

@kallewoof
17 years ago

wp-mail.php patch for base64 encoding

#1 @Viper007Bond
17 years ago

  • Component changed from General to Administration
  • Keywords has-patch 2nd-opinion added
  • Milestone changed from 2.5 to 2.4

#2 @rene_e
17 years ago

Hi, thanks for the patch. Had the same problem, was solved with the patch. But the title shouldn't be decoded, it's not encoded in base64 (cause it's no content). So by removing the second part of the patch, it works flawlessly with Moto-EZX email client.

#3 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch removed

See also #5204

#4 @Denis-de-Bernardy
15 years ago

  • Component changed from Administration to Mail
  • Keywords 2nd-opinion removed
  • Owner anonymous deleted

#5 @westi
15 years ago

  • Component changed from Mail to Blog by Email
  • Milestone changed from 2.9 to Future Release
  • Owner set to westi
  • Status changed from new to accepted

Moving all blog-by-email bugs to a seperate component and out of 2.9.

This will all be address by a new canonical blog-by-email plugin which is under development and will hopefully be available by the time 2.9 is released.

#6 @nacin
11 years ago

  • Component changed from Blog by Email to Mail

#7 @chriscct7
9 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from accepted to closed

This feature is getting removed by #22942. Closing as wontfix

Note: See TracTickets for help on using tickets.