-
Notifications
You must be signed in to change notification settings - Fork 642
Don't fail on empty part, just return zero length #1621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| if (text == NULL) | ||
| return MAILIMAP_ERROR_FETCH; | ||
| if (text == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you enable that behavior only if outlook server is detected?
…st zero length (2)
|
Sorry for not getting back to you earlier. This pull request somehow went out of my focus. |
| @@ -1,4 +1,4 @@ | |||
| ## MailCore 2: Introduction ## | |||
| ## MailCore 2: Introduction ## | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you revert that part?
| bool wholePart, uint32_t offset, uint32_t length, | ||
| Encoding encoding, IMAPProgressCallback * progressCallback, ErrorCode * pError); | ||
| void storeLabels(String * folder, bool identifier_is_uid, IndexSet * identifiers, IMAPStoreFlagsRequestKind kind, Array * labels, ErrorCode * pError); | ||
| int fetch_rfc822(mailimap * session, bool identifier_is_uid, uint32_t identifier, char ** result, size_t * result_len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are those part of the change?
|
|
||
| #ifdef __cplusplus | ||
|
|
||
| typedef struct mailimap_fetch_type mailimap_fetch_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if that data type wasn't public.
Cherry-pick fix from upstream mailcore2 PR #1621. Outlook.com IMAP server sometimes omits message parts and returns them as zero-length when there is a vCalendar part in the message. Previously this would cause a MAILIMAP_ERROR_FETCH error, failing the entire fetch. This fix: 1. Adds mOutlookServer detection based on hostname 2. When fetching from Outlook and encountering a NULL/empty part, returns zero-length data instead of an error This allows messages with vCalendar attachments to be fetched successfully from Outlook.com accounts. Upstream: MailCore/mailcore2#1621
Cherry-pick fix from upstream mailcore2 PR #1621. Outlook.com IMAP server sometimes omits message parts and returns them as zero-length when there is a vCalendar part in the message. Previously this would cause a MAILIMAP_ERROR_FETCH error, failing the entire fetch. This fix: 1. Adds mOutlookServer detection based on hostname 2. When fetching from Outlook and encountering a NULL/empty part, returns zero-length data instead of an error This allows messages with vCalendar attachments to be fetched successfully from Outlook.com accounts. Upstream: MailCore/mailcore2#1621 Co-authored-by: Claude <noreply@anthropic.com>
Outlook.com IMAP server omits some parts and returns them as zero-length ones if there is vCalendar part in the message.
IMAP dump and message content is in the attachment.
Attachment.zip