Attachments getting truncated to a multiple of 3 bytes
Brought to you by:
gnosbush,
liverpoolfcfan
Versions: z-push-2.2.1-1939, zimbra62, zcs-8.6
I'm seeing a problem where binary attachments are truncated to a multiple of 3 bytes. I tried 3 different Android clients and it happens on all of them.
I'm not sure if this is an issue with z-push or the zimbra backend.
What sort of attachments are you having issues with? And, how can you tell they are getting truncated?
Originally I was seeing it with p12 files so I created some binary test files ranging from 1 to 10 bytes.
I can tell they are getting truncated by looking at the size of the saved files on the phone.
I figured it out. It is a bug in z-push. When reading using the convert.base64-encode filter and you hit end of file, you need to remove the filter then do a final read to get the trailing bytes.
Last edit: Robert Nelson 2015-06-16
Attached is the patch to fix it.
Thanks for following-up. I was going to suggest you open a thread on the z-push forum https://forums.zarafa.com/forumdisplay.php?72-Z-Push-on-the-Community-supported-backends but then I looked and saw you already had.
Ultimately it likely comes down to a php bug - https://bugs.php.net/bug.php?id=68532&edit=1 I think.
Yeah that's the issue. Fortunately my fix works around the bug and is harmless once the bug is fixed.
Not a backend issue. Ticket opened on zarafa z-push forum. Closing this ticket.