1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00
Go to file
Joe Steele 77407eb5b7 Don't base64 encode attachments of type message/rfc822.
The problem:  Receive a message with an attachment of type message/rfc822
and forward it.  When the message is sent, K-9 Mail uses base64 encoding
for the attachment.  (Alternatively, you could compose a new message and
add such an attachment from a file using a filing-picking app, but that is
not 100% effective because the app may not choose the correct
message/rfc822 MIME type for the attachment.)

Such encoding is prohibited per RFC 2046 (5.2.1) and RFC 2045 (6.4).  Only
8bit or 7bit encoding is permitted for attachments of type message/rfc822.

Thunderbird refuses to decode such attachments.  All that is shown is the
base64 encoded body.

This commit implements LocalAttachmentBody.setEncoding.  If an attachment
to a newly composed message is itself a message, then setEncoding("8bit")
is called, otherwise setEncoding("base64")  is called for the attachment.
Similar behavior occurs when an attachment is retrieved from LocalStore.

The setEncoding method was added to the Body interface, since all
implementations of Body now declare the method.

The problem here differs from that in the preceding commit:  Here, the
encoding problem occurs on sending, not on receipt.  Here, the entire
message (headers and body) is base64 encoded, not just the body.  Here,
the headers correctly identify the encoding used;  it's just that the RFC
does not permit such encoding of attached messages.  The problem here
could in fact occur in combination with the preceding problem.
2013-09-03 19:52:11 -04:00
assets SingleMessageView cleanup 2012-04-04 10:04:57 +02:00
compile-only-libs upgrade our android-support library in the hopes that the newer version 2013-07-17 18:36:31 -04:00
docs Added diagram that visualizes activity interactions 2011-10-27 19:13:13 +02:00
images Change appearance of unread widget 2013-03-16 01:57:21 +01:00
libs Use ADT's magic to include the necessary libraries from lib/ 2012-09-08 21:44:49 -07:00
plugins Update ckChangeLog to v1.0.0 2013-07-23 20:28:16 +02:00
res Merge pull request #373 2013-09-02 22:23:56 +02:00
src Don't base64 encode attachments of type message/rfc822. 2013-09-03 19:52:11 -04:00
tests Simplify Eclipse setup. 2013-05-31 18:00:45 -04:00
tools Add script to sync localized strings.xml files with the master file 2013-07-09 17:16:23 +02:00
.gitignore Ignore Atlassian config from IntelliJ 2013-07-16 14:55:37 -07:00
.gitmodules Kill our use of submodules dead. They're too painful for new contributors 2012-11-24 17:15:01 -05:00
.project Simplify Eclipse setup. 2013-05-31 18:00:45 -04:00
ActionBarSherlock.iml IntelliJ IDEA: Update android support version per e796468256. 2013-01-09 13:24:30 -08:00
Android-PullToRefresh.iml IntelliJ IDEA: 12.0 updates. 2012-12-18 15:11:47 -08:00
Android.mk Merge ashleywillis' changes in https://github.com/k9mail/k-9/pull/97. 2011-11-14 14:00:15 -08:00
AndroidManifest.xml Bumped manifest to 4.511 2013-08-31 11:57:59 -04:00
ant.properties Upgrade to SDK 15 2012-03-11 14:31:35 -05:00
build_common.xml fixed location of ant-contrib.jar in build_common.xml when running ant from tests/. 2012-06-07 22:57:41 -05:00
build.gradle Update gradle version as required for Android Studio 0.2.x 2013-07-16 15:42:07 +02:00
build.xml Fixes for automated change log publication 2013-08-27 20:28:06 -04:00
ckChangeLog.iml IntelliJ IDEA: Project updates to drag in ckChangeLog. 2013-01-09 13:26:42 -08:00
HoloColorPicker.iml Add pom and IntelliJ configuration for HoloColorPicker 2013-01-17 02:16:24 -08:00
HTMLCLEANER_LICENSE Merge ashleywillis' changes in https://github.com/k9mail/k-9/pull/97. 2011-11-14 14:00:15 -08:00
k9mail.iml Add pom and IntelliJ configuration for HoloColorPicker 2013-01-17 02:16:24 -08:00
k9mail.ipr Add pom and IntelliJ configuration for HoloColorPicker 2013-01-17 02:16:24 -08:00
MODULE_LICENSE_APACHE2 Initial commit - This source code should be EXACTLY what the current version of the 'Email' application in the android repo looks like as of this date. 2008-10-28 01:04:44 +00:00
NOTICE Initial commit - This source code should be EXACTLY what the current version of the 'Email' application in the android repo looks like as of this date. 2008-10-28 01:04:44 +00:00
proguard.cfg Upgrade us to android-14 infrastructure 2011-10-27 12:41:24 -04:00
project.properties Update targetSdkVersion to 17 2013-05-24 22:33:09 +02:00
settings.gradle Add initial Gradle support 2013-06-28 23:59:08 +02:00