Comments (7)
Hey @dsanghan, the fix consists of a number of changes in "src/low-level/imap/mailimap_parser.c".
I'd rather just push my branch but here it is anyways: mailimap_parser.zip
from libetpan.
@dinhvh if you could add me as a contributor I can make a PR with a workaround
from libetpan.
FYI: I have also created an issue on Apple’s developer site since it’s an iCloud issue and eventually, Apple should fix it on their side:
from libetpan.
Ok, some progress. I'm now looking at mailimap_msg_att_parse_progress
where it tries to parse the message after the message sequence number and FETCH identifier (* 7027 FETCH
) have been successfully parsed.
The call stack is now:
mailimap_msg_att_parse_progress
mailimap_message_data_parse_progress
mailimap_response_data_parse_progress
mailimap_cont_req_or_resp_data_parse_progress
mailimap_struct_multiple_parse_progress
mailimap_response_parse_progress
mailimap_response_parse_with_context
mailimap_parse_response
mailimap_uid_fetch_qresync_vanished
mailimap_uid_fetch_changedsince
mailimap_uid_fetch
It passes mailimap_oparenth_parse
successfully, then calls mailimap_struct_spaced_list_parse_progress
and that too returns with no error.
However, it now expects a closing parenthesis )
when the stream is still at ENVELOPE (
, and this is where it fails. So it seems ENVELOPE
is unsupported at this point.
I'll dive deeper into mailimap_struct_list_parse_progress
next.
from libetpan.
And more progress: it seems to choke on an ENVELOPE
's messageid containing quotes:
"<"392889836.11.1529401004417.JavaMail.Redacted"@Redacted>"
mailimap_env_message_id_parse
uses mailimap_nstring_parse
which encounters the first "
after the string opens and concludes that that must be the end of the string and therefore the messageid.
Consequently, mailimap_cparenth_parse
fails because the next character in the stream is not a )
concluding the ENVELOPE
but the continuation of the messageid, namely <
from libetpan.
Looking at the RFC, the formal syntax does not seem to allow DQUOTE's in the envelope messageid (except when properly escaped, which in this case, they are not):
env-message-id = nstring
nstring = string / nil
nil = "NIL"
string = quoted / literal
literal = "{" number "}" CRLF *CHAR8 ; Number represents the number of CHAR8s
quoted = DQUOTE *QUOTED-CHAR DQUOTE
QUOTED-CHAR = <any TEXT-CHAR except quoted-specials> / "\" quoted-specials
TEXT-CHAR = <any CHAR except CR and LF>
quoted-specials = DQUOTE / "\"
But alas, here we are.
from libetpan.
@BasTossings could you please share the fix?
from libetpan.
Related Issues (20)
- Null Pointer Dereference STATUS Response HOT 3
- [BUG] Hang / performance problems with commit HOT 2
- Compiling w/in Xcode make scripts fail when directory tree has a folder name w/ a space character HOT 1
- Clearer README HOT 4
- No such module 'libetpan'
- build android error HOT 1
- cyrus-sasl build.sh error
- unable to build lib on Mac M1 HOT 3
- mailmime_parse() parses the mail unexpectly HOT 1
- Unable to compile and link the library to my C project on Mac M1pro !
- imap sample code Can not connect to imap.gmail.com HOT 3
- SELECT: parsing fails if FLAGS or PERMANENTFLAGS responses contain parentheses
- Draft new release with security fixes
- etpan.org is down, Please maintain the website. HOT 1
- Building libetpan in Xcode: make scripts fail when any folder in the directory tree has a name with a space character
- A hidden iconv error
- IMAP protocol error communicating with outlook.com
- Please remove legacy VoIP feature HOT 3
- `libetpan` on macOS 10.5–10.6 and `CFNetwork`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libetpan.