Opened 17 years ago
Closed 9 years ago
#5252 closed defect (bug) (wontfix)
base64-encoded post-by-email post garbled.
Reported by: | kallewoof | Owned by: | westi |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3 |
Component: | 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)
Change History (8)
#1
@
17 years ago
- Component changed from General to Administration
- Keywords has-patch 2nd-opinion added
- Milestone changed from 2.5 to 2.4
#2
@
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.
#4
@
15 years ago
- Component changed from Administration to Mail
- Keywords 2nd-opinion removed
- Owner anonymous deleted
#5
@
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.
wp-mail.php patch for base64 encoding