<<< Date Index >>>     <<< Thread Index >>>

imap/2244: Copying mail message from local mailbox to remote imaps server hangs when message contains NUL chars



>Number:         2244
>Notify-List:    
>Category:       imap
>Synopsis:       Copying mail message from local mailbox to remote imaps server 
>hangs when message contains NUL chars
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 19 19:49:37 +0200 2006
>Originator:     Patrice Levesque
>Release:        mutt-1.4.2.1
>Organization:
>Environment:
Mandrake GNU/Linux 10
>Description:
Some badly-formed spam contain NUL characters (\000).  When messages containing 
NULL characters are moved between local mailboxes, no problem arise.  When 
moved from local mailboxes to remote IMAP servers, mutt hangs.  Tried with 
remote cyrus-imapd, courier-imap and dovecot.

Seems worthy to mention this bugreport will be duplicated in muttng's tracker 
because muttng has the same hanging behavior.

Here attached is a mail that provokes that bug.
>How-To-Repeat:
Open the attached mail file with mutt, try to "s"ave in a distant IMAP folder.
>Fix:
Options are open!
>Add-To-Audit-Trail:

>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: application/octet-stream; name="mail_with_nul"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="mail_with_nul"
 
 UmVjZWl2ZWQ6IGZyb20gbG9jYWxob3N0IGJ5IHB0YWZmLnRlY2hub2xvZ2llcy5vcmcKCXdpdGgg
 U3BhbUFzc2Fzc2luICh2ZXJzaW9uIDMuMC40KTsKCU1vbiwgMDggTWF5IDIwMDYgMDM6MDA6NDYg
 LTA0MDAKRnJvbTogUnV0aCBQYXJrZXIgPDM5MGNvbGxlZW5AYWJzb2x1dGVtb3Rpb24uY29tPgpU
 bzogZGNhdC53YXluZUBwdGFmZi5jYQpTdWJqZWN0OiBHZXQgYSBkaXBsb21hIQpEYXRlOiBNb24s
 IDA4IE1heSAyMDA2IDIyOjQxOjA3ICswMzAwCk1lc3NhZ2UtSWQ6IDw3ODFmMDFjNjcyZDckOWQ4
 NWY1Mz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