Open rancidfrog opened 6 years ago
While it's not really common to have "s in an account name we should escape them rather than prevent them.
@philipwhiuk I would like to work on this issue, any suggestions on how to proceed?
Checkout a copy of the code in Android Studio, investigate how we build the header section of compose screen and try and reproduce the action. Then look at how stuff gets pasted in and escape "s.
Some notes:
Still, we should accept everything as display name and do the appropriate escaping when composing a message. I don't think this is an easy issue for beginners to tackle. Email addresses are hard.
Thanks @philipwhiuk @cketti
I'm unable to reproduce this bug, I'll try to do that, and fix it if possible.
@cketti But, k9 app uses account name when copying email address on longpress. I longpressed on my address from a mail in sent folder then pasted it in compose view. It pasted account name as name. So to reproduce issue all you have to do is temporarily change your account name to include apostraphe " . Then use k9mail longpress on your address to copy email and when you paste it will come up as " acount with " name " < email address > I came across issue when I was testing duplicate mails in sent folders. So, I sent an email to myself.
Edit: App also seems to use Account name for sent items. I.E. Copying own address from mail in sent folder by longpress results in "Account name" < email address >
K9-mail allows account name to contain
"
character: Yet, when using long-press to copy email address directly from k9-mail, the process wraps name with"
characters. However, in mail headers they do not exist, (look at email format in show headers and it appears asname < email address >
, no"
anywhere).This creates parsing errors when pasting copied address into compose field.
K9-mail should either handle parsing
"
in compose forms, or forbid use in account name to avoid errors.