libetpan
libetpan copied to clipboard
Parse BODYSTRUCTURE problem
I found a problem when calling IMAPSession::fetchMessages due to an unnormal message which has BODYSTRUCTURE like this:
(("TEXT" "PLAIN" ("CHARSET" "GB2312") NIL NIL NIL 0 0 ("BOUNDARY" "=====002_Dragon477158377507_=====") NIL NIL) "RELATED" ("BOUNDARY" "=====002_Dragon477158377507_=====") NIL NIL)
In libetpan the strong part is assumed to be either {xxx} or "xxx" or NIL. I think it's unreasonable to fall into failure, at least in UNSTRICT MODE. It's better to release this restrict, or skip parsing this message. Otherwise fetchMessages( with a range 1 to INT64_MAX ) will lead to ErrorFetch with none message return.
Will this problem be fixed soon?
Thanks!
Author should comment on whether this ticket can be reproduced on a more recent build.