crash with chinese character emails #47
Labels
No Label
IMAP
JMAP
Maildir
Retired
User Experience
User Interface
bsd
bug
contacts
currently worked on
documentation
duplicate
easy
enhancement
help wanted
invalid
linux-gnu
macos
mbox
notmuch
question
security
wishlist
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: meli/meli#47
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I'm getting a panic when trying to run the notmuch backend. Running with RUST_BACKTRACE=1 yields the following.
Here is the trace when running with debug:
Some more info. I've narrowed it down to some spam messages with chinese characters. Here is one of the offending messages (from notmuch show):
notmuch backend crashto crash with chinese character emailsI renamed the bug, because I'm not sure this is actually a notmuch backend bug.
OK one more follow up, maybe the bug is related to notmuch. If I forward the email to my fastmail account things work with the jmap backend
Can you share the file (ie
/home/jschrod/.Mail/Chalmers/INBOX/new/1585554068.M143105071P11995Q27432Rc0c2cca5.linux-rxj5
)?I had to zip the file, because I could not upload txt files.
Hm I can't reproduce this crash. I can view it just fine with the notmuch backend. Were you doing something specific when it happened?
It happens when I open meli with "INBOX" = { query="tag:inbox", subscribe=true}
However I've just found that I still get the crash even without that file. So I'm not sure if it was actually that mail (I tested with "INBOX" {query="thread:xxxx", subscribe=true} where the xxx corresponded to the thread of the above mail. I will see if I can find another email that is causing issues.
Is there a way I can search the whole notmuch database, not just the subscribed mailbox?
The query will look into the entire database, as notmuch doesn't have a concept of mailboxes. If you mean search as in search from within meli, it searches the entire database (meaning it doesn't
AND
with the virtual mailbox's query)OK here is another one that causes issues for me, but even after removing that message I get a crash.
That's weird if I subscribe to a different mailbox (i.e. a different tag) and I do a search tag:inbox I do not get all results but just the results that have that tag in the current mailbox. I am using the "/" shortcut and then tag:inbox
Let me know if I can do anything else to debug. If you point me to the right file where I should look I can try to debug further myself.
Looks like it was the second e-mail. in
melib/src/email/address.rs:179
there's an assumption that the string is valid utf-8 but the email contains an invalid string inside the MIME encoded word part of theTo
header value. I changed it to a lossy UTF-8 conversion instead and it won't crash.