"Multipart/Encrypted" not supported, only "multipart/encrypted"

RESOLVED FIXED in Thunderbird 3.0b1

Status

Thunderbird
Mail Window Front End
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: Danai Sae-Han, Assigned: Magnus Melin)

Tracking

Thunderbird 3.0b1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.44 KB, patch
Bienvenu
: review+
Bienvenu
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; nl; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-2)
Build Identifier: Mozilla-Thunderbird 1.5.0.10

Hi!

When I send encrypted emails from Mew (Messaging in the Emacs World; http://www.mew.org/), I can't open them in TB+Enigmail.

Problem is that TB doesn't understand "Multipart/Encrypted".  But when I manually edit the outgoing email from Mew, and replace it with the lowercase "multipart/encrypted", TB will recognize my email and Enigmail will do its work just fine.

I hope you can fix this problem.

Thanks


/Danai

Reproducible: Always

Steps to Reproduce:
1. Send an encrypted email from Mew
2. Open TB and receive the email
3. Open the email
Actual Results:  
Blank message window, with "Part 1.1" and "Part 1.2" as attachments, the first containing the Mime version "1.0", the latter the raw encrypted message.

Expected Results:  
Popup window asking me for a password, and decrypting the email.

http://mozdev.org/bugs/show_bug.cgi?id=7269 shows that this bug has been reported two and a half years ago against Enigmail, but the author wrote this needed to be fixed in TB to get an elegant solution.
(Reporter)

Updated

11 years ago
Version: unspecified → 1.5
for reference, http://www.faqs.org/rfcs/rfc2045.html (mime)
5.1.  Syntax of the Content-Type Header Field
     content := "Content-Type" ":" type "/" subtype
                *(";" parameter)
                ; Matching of media type and subtype
                ; is ALWAYS case-insensitive.
   The type, subtype, and parameter names are not case sensitive.  For
   example, TEXT, Text, and TeXt are all equivalent top-level media
   types.
(Reporter)

Comment 2

11 years ago
Indeed.  I reported this bug, because apparently bug #59619, "MIME types should not be case sensitive" (https://bugzilla.mozilla.org/show_bug.cgi?id=59619), is not the same as this one.
(Reporter)

Comment 3

11 years ago
I just installed Mozilla-Thunderbird 2.0.0.0, and it has the same problem: the encrypted email appears as "Part 1.1" and "Part 1.2".

Comment 4

11 years ago
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; nl; rv:1.8.1.3)
> Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-2)
> Build Identifier: Mozilla-Thunderbird 1.5.0.10
> 
> Hi!
> 
> When I send encrypted emails from Mew (Messaging in the Emacs World;
> http://www.mew.org/), I can't open them in TB+Enigmail.
> 
> Problem is that TB doesn't understand "Multipart/Encrypted".  But when I
> manually edit the outgoing email from Mew, and replace it with the lowercase
> "multipart/encrypted", TB will recognize my email and Enigmail will do its work
> just fine.
> 
> I hope you can fix this problem.
> 
> Thanks
> 
> 
> /Danai
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Send an encrypted email from Mew
> 2. Open TB and receive the email
> 3. Open the email
> Actual Results:  
> Blank message window, with "Part 1.1" and "Part 1.2" as attachments, the first
> containing the Mime version "1.0", the latter the raw encrypted message.
> 
> Expected Results:  
> Popup window asking me for a password, and decrypting the email.
> 
> http://mozdev.org/bugs/show_bug.cgi?id=7269 shows that this bug has been
> reported two and a half years ago against Enigmail, but the author wrote this
> needed to be fixed in TB to get an elegant solution.
> 

That said, I'm not sure this is a bug in TB per se.  I suspect WONTFIX, but hat is a developer decision.

Comment 5

11 years ago
I almost forgot about this bug. Scott, maybe you have any idea? For some strange reason, none of the Enigmail code is called if the content-type of an email ("mutlipart/encrypted") is not 100% in small letters. 

Here is how I register the content-type handler in Mozilla:
  static const nsModuleComponentInfo info =
  { "Enigmail Content Handler",
    NS_ENIGCONTENTHANDLER_CID /* some UUID */,
    ""@mozilla.org/mimecth;1?type=multipart/encrypted",
    nsEnigContentHandlerConstructor,
  };

  // Create a generic factory for the content handler
  nsCOMPtr<nsIGenericFactory> factory;
  rv = NS_NewGenericFactory(getter_AddRefs(factory), &info);
  if (NS_FAILED(rv)) return rv;

  nsCOMPtr<nsIComponentRegistrar> registrar;
  rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
  if (NS_FAILED(rv)) return rv;

  // Register factory
  rv = registrar->RegisterFactory(info.mCID, info.mDescription,
                                           info.mContractID, factory);

  if (NS_FAILED(rv)) return rv;
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

9 years ago
Assignee: mscott → nobody
(Assignee)

Comment 6

9 years ago
I wonder if this still exists on trunk? Might have been fixed by the changes in bug 409962.

Comment 7

9 years ago
Unfortunately the bug is still not fixed, I checked with the latest nightly build (20080831030154): .
(Assignee)

Comment 8

9 years ago
Created attachment 342796 [details] [diff] [review]
proposed fix

Patrick: are you able to try and see if this patch fixes it for you?
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED

Comment 9

9 years ago
Magnus, I tried the patch: yes it fixes the bug -- I'd say commit it :-)
(Assignee)

Updated

9 years ago
Attachment #342796 - Flags: superreview?(bienvenu)
Attachment #342796 - Flags: review?(bienvenu)

Comment 10

9 years ago
Comment on attachment 342796 [details] [diff] [review]
proposed fix

this would leak memory, since ToNewCString allocates. You should just be able to use lowerCaseContentType.get().

While we're here, and testing this code, we should rewrite it to use an nsCString for lookupID. Then, I think we can just init it with "@mozilla.org/mimecth;1?type=", and append the lower case content type, or append the content_type and lower case the whole string...
Attachment #342796 - Flags: superreview?(bienvenu)
Attachment #342796 - Flags: superreview-
Attachment #342796 - Flags: review?(bienvenu)
Attachment #342796 - Flags: review-
(Assignee)

Comment 11

9 years ago
Created attachment 343068 [details] [diff] [review]
proposed fix, v2

Hopefully this is better:)
Attachment #342796 - Attachment is obsolete: true
Attachment #343068 - Flags: superreview?(bienvenu)
Attachment #343068 - Flags: review?(bienvenu)

Updated

9 years ago
Attachment #343068 - Flags: superreview?(bienvenu)
Attachment #343068 - Flags: superreview+
Attachment #343068 - Flags: review?(bienvenu)
Attachment #343068 - Flags: review+

Comment 12

9 years ago
Comment on attachment 343068 [details] [diff] [review]
proposed fix, v2

yes, thanks!
(Assignee)

Comment 13

9 years ago
changeset:   610:0e2ef43af74d
http://hg.mozilla.org/comm-central/rev/0e2ef43af74d

->FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b1
(Assignee)

Updated

9 years ago
Depends on: 460058
You need to log in before you can comment on or make changes to this bug.