-
Notifications
You must be signed in to change notification settings - Fork 55
Fix imap attachments #181
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
Open
Diogofornazari
wants to merge
303
commits into
Z-Hub:master
Choose a base branch
from
Diogofornazari:fix-imap-attachments
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix imap attachments #181
Diogofornazari
wants to merge
303
commits into
Z-Hub:master
from
Diogofornazari:fix-imap-attachments
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ned-error-in-sprintf to develop * commit 'cf4af808225f09433aebd11abd8b51697d80182f': ZP-1621 BackendCombined: Fix typo in ImportFolderDeletion(). Released under the Affero GNU General Public License (AGPL) version 3.
…ing-quote-resulting-in-failed-rfc822-check to develop * commit '1063692500aaaf3bbdb4cfbe5e76f37e9bb02f24': ZP-1441 Utils: remove double whitespace in address, renaming and fix typos. Released under the Affero GNU General Public License (AGPL) version 3. ZP-1441 BackendMaildir: disable validation of atoms in address-headers. Released under the Affero GNU General Public License (AGPL) version 3. ZP-1441 Mail_RFC822: disable validation of atoms in address-headers. Released under the Affero GNU General Public License (AGPL) version 3. ZP-1441 Mail_RFC822: remove quote-adding workaround, add updates from Pear/Mail source (GitHub). Released under the Affero GNU General Public License (AGPL) version 3.
…dprovider-increase-maxwaitcycles-value to develop * commit 'cbda3cc019947c17dbfa8fbf19e293e092b99097': ZP-1623 IpcMemcachedProvider: Increase maxWaitCycles value. Released under the Affero GNU General Public License (AGPL) version 3.
…to-user-for-post-requests-only to develop * commit 'c5fdcd25dfea18883f7261423ab5ac5ba06b06fd': ZP-1625 Save device data in POST requests only.
…neral Public License (AGPL) version 3.
… License (AGPL) version 3.
…ero GNU General Public License (AGPL) version 3.
…om-sync-filter-type-support to develop * commit '1fe318d07bc0e1a9785b56d5e36857e08ef83add': ZP-1624 . Added MAX_CUSTOM_FILTERTYPE control. Released under the Affero GNU General Public License (AGPL) version 3. ZP-1624 . Replaced tabs with spaces. Released under the Affero GNU General Public License (AGPL) version 3. ZP-1624 1 year custom sync filter type support. Released under the Affero GNU General Public License (AGPL) version 3.
Released under the Affero GNU General Public License (AGPL) version 3.
…rialize state machine data read from disk Merge in ZHUB/z-push from feature/ZP-1626-retry-loop-when-failing-to-unserialize-state-machine-data-read-from-disk to develop * commit 'f313344b891192323074bd2d0338bb29ea161471': ZP-1626 . Released under the Affero GNU General Public License (AGPL) version 3. ZP-1626 . First version. Released under the Affero GNU General Public License (AGPL) version 3.
…s' of https://stash.kopano.io/scm/zhub/z-push into bugfix/ZP-1617-the-ios-devices-send-two-accept-responses
…responses Merge in ZHUB/z-push from bugfix/ZP-1617-the-ios-devices-send-two-accept-responses to develop * commit 'b939cad5f177695caaec3035c15a6e7a92d4a659': ZP-1617 ios devices send two responses. ZP-1617 Meeting response sent twice on an ios device.
Added display of loaded Backend Released under the Affero GNU General Public License (AGPL) version 3.
…eral Public License (AGPL) version 3.
Merge in ZHUB/z-push from bugfix/ZP-1632-syntax-error-in-kopano-backend-2.6.3 to develop * commit 'b23f06a01b615446cdd5b19d3383b767610ce974': Added missing $
…Removed SafeGetContentsUnserialize not more needed. Released under the Affero GNU General Public License (AGPL) version 3.
…er the Affero GNU General Public License (AGPL) version 3.
…ity (not used in ActiveSync specifications). Released under the Affero GNU General Public License (AGPL) version 3.
Merge in ZHUB/z-push from feature/ZP-1626-retry-loop-when-failing-to-unserialize-state-machine-data-read-from-disk to develop * commit '41c1aac2012fb62ea7565a4a81bfc25fe9993668': ZP-1626 . SafeGetContents is now able to unserialize with opt param. Removed SafeGetContentsUnserialize not more needed. Released under the Affero GNU General Public License (AGPL) version 3. ZP-1626 . Re-added SafeGetContents. Released under the Affero GNU General Public License (AGPL) version 3.
…ncelled exception. Released under the Affero GNU General Public License (AGPL) version 3.
…nstancetype by checking for RRULE, RECURRENCE-ID and existing event. Released under the Affero GNU General Public License (AGPL) version 3.
… under the Affero GNU General Public License (AGPL) version 3.
…ons to VEVENTs as iCalender does not inherit. Released under the Affero GNU General Public License (AGPL) version 3.
…. Released under the Affero GNU General Public License (AGPL) version 3.
… to recipients array. Released under the Affero GNU General Public License (AGPL) version 3.
Released under the Affero GNU General Public License (AGPL) version 3.
…te-fix-loss-of-content-with-outlook-and-koe ZP-1615 BackendStickyNote: Fix loss of content with Outlook and KOE on ChangeMessage() without changes.
AS16.1 changes based on grommunio-sync commit
…n, update or deletion AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@127bb01
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@c1cd695
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@bd5ecd1
…ions AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@d9cb399
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@8095b7f
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@51a0e0d
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@6c22932
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@171677a
…an attendee to a standard appointment on the mobile) AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@5c2e7a5
…ug when switching calendars during creation) AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@f0b90a8
… be treated as floats AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@eba9428
AS16.1 changes based on grommunio-sync commit grommunio/grommunio-sync@1f6d6cd
More AS16.1 Changes
As16 appointment
Removed reference to wiki.z-hub.io and replaced with link to Github documentation.
Simplify Nginx directive with case-insensitive match.
Update config.php
to use parameters to prevent SQL Injection CVE-2025-8264 as reported by Snyk and XBOW
CVE-2025-8264 - Imap - update user_identity getIdentityFromSql, to use parameters to prevent SQL Injection
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Released under the GNU Affero General Public License (AGPL), version 3
Fix for 0-byte attachments and broken MIME structure in IMAP backend
Description: This PR fixes the bug reported in Issue #NUMERO_DA_SUA_ISSUE.
Changes proposed in this pull request:
Fixed add_sub_part:
Now explicitly blacklists Content-Length and Content-Transfer-Encoding headers from the original message to prevent data corruption (0-byte attachments).
Identifies message/rfc822 as a container, preventing it from being treated as an empty file body.
Forces base64 encoding only on file leaves, not on containers.
Fixed add_extra_sub_parts:
Added logic to handle nested MIME structures recursively without flattening them incorrectly.
Introduced $inside_container flag to preserve body text within forwarded .eml attachments.
Prevented duplication of attachments in the root message when multipart structures are processed.
Testing
Environment: Z-Push 2.7.5 / PHP 8.3 / Dovecot 2.3.20.
Client: Outlook 2511 (ActiveSync).
Result: Forwarded emails with attachments now arrive with correct file sizes. Nested .eml attachments open correctly with body and attachments intact.
Fixes #180