You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Collect OK.
No binary section size collected.
Close fetch: in response-data: imapwire: expected number, got ")".
Client connection state: logout.
You can see that the fetchCmd.Next().Collect() did not return an error, but the returned message buffer does not contain the requested data. Why the Collect() method won't return an error? Is it a pattern to always successfully close the fetch command before trusting the fetched objects?
The text was updated successfully, but these errors were encountered:
I also have two other side-queries (asking for opinions):
I traced the application and indeed it encountered an integer overflow (error by strconv.ParseUint), but the returned error is kinda irrelevant (expected number, got ")"). Is it possible to propagate the conversion error (regarding the library's design and access to setting the decoder error down the functions' call chain)?
That number anomaly caused by the misbehaving IMAP server blows the whole client up; is it possible to add a logic that tries to recover from these anomalies instead of closing the client? Of course handling all anomalies would require hundreds lines of codes, but, the least is to end the misbehaved command and move onto next ones.
Is it possible to propagate the conversion error (regarding the library's design and access to setting the decoder error down the functions' call chain)?
It should be possible via Decoder.returnErr, yeah.
That number anomaly caused by the misbehaving IMAP server blows the whole client up; is it possible to add a logic that tries to recover from these anomalies instead of closing the client?
That's tricky. It's dangerous to try to recover from any error, because we might've dropped important messages and our state might become out-of-sync. We could try to special-case specifically overflow errors.
I encountered a misbehaving IMAP server in which a response has a bad impossible big number:
Now assume the following example application that interacts with the misbehaving IMAP server:
The output of running the application is:
You can see that the
fetchCmd.Next().Collect()
did not return an error, but the returned message buffer does not contain the requested data. Why theCollect()
method won't return an error? Is it a pattern to always successfully close the fetch command before trusting the fetched objects?The text was updated successfully, but these errors were encountered: