-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
mailbox parser error #171
Comments
thunderbird, apple mail, just works fine with such mailbox. |
https://www.rfc-editor.org/rfc/rfc3501#section-9:
As such, per the spec you should be escaping your quotes. |
Extra quotes should be added through somehow in a long email thread across different mail clients and servers. I am not able to eliminate that before I saw it. Should I escape it before send to this library?
汪院
…________________________________
发件人: Dirkjan Ochtman ***@***.***>
发送时间: Monday, May 27, 2024 5:36:20 PM
收件人: djc/tokio-imap ***@***.***>
抄送: tiehexue ***@***.***>; Author ***@***.***>
主题: Re: [djc/tokio-imap] mailbox parser error (Issue #171)
https://www.rfc-editor.org/rfc/rfc3501#section-9:
address = "(" addr-name SP addr-adl SP addr-mailbox SP
addr-host ")"
addr-name = nstring
; If non-NIL, holds phrase from [[RFC-2822](https://www.rfc-editor.org/rfc/rfc2822)]
; mailbox after removing [[RFC-2822](https://www.rfc-editor.org/rfc/rfc2822)] quoting
literal = "{" number "}" CRLF *CHAR8
; Number represents the number of CHAR8s
nstring = string / nil
quoted = DQUOTE *QUOTED-CHAR DQUOTE
QUOTED-CHAR = <any TEXT-CHAR except quoted-specials> /
"\" quoted-specials
quoted-specials = DQUOTE / "\"
string = quoted / literal
As such, per the spec you should be escaping your quotes.
―
Reply to this email directly, view it on GitHub<#171 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHIYCKCJIXODG6DPFWNOFLZEL5BJAVCNFSM6AAAAABIKMRXCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGA3TKOBSGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I'm open to reviewing a PR that makes the parser more robust on this front, but whether I'll want to merge it depends on the complexity. |
I am trying to build a client app based on himalaya(https://github.com/soywod/himalaya), which used imap-proto 0.16.3. It crashes when parsing a mailbox with quotes, e.g. ((“name_in_base64”extraname(extrahost)”” nil “wangyuan” “host.com”)). Any advices how to fix
The text was updated successfully, but these errors were encountered: