Corrupted files are downloaded from web ui

Issue #949 closed
Andrew Ladutsko created an issue

Hi!

Files that I download from web ui are corrupted - they are ~172 bytes larger than originals. See attachments. From_client.txt is the original email, Image001.jpg - attacment that I 've saved from email client. From_piler.eml is the result of "Download as EML" and Image001_wrong_size.jpg - file that I downloaded from web ui.

1.3.5-pre1 build 996, apache 2.4.x, php 7.2, centos 7

Comments (5)

  1. Andrew Ladutsko reporter

    Just tried to download the same attachment from build-in auditor account - and it worked fine. Hold on, I'll check if the issue is made by my own custom authentication script.

  2. Andrew Ladutsko reporter
    • changed status to open

    Seems like I found the reason for corrupted file downloads. An empty line (172 spaces and a newline) is prepended to all pages and downloads. The issue is in webui/languages/ru/messages.php - this empty line is after closing ?>. The file itself is full of unused spaces after each line of code.

  3. Janos SUTO repo owner

    Thanks for the debugging. Please remove the trailing "?>" characters,and you should be fine. I'll fix it in the source tree as well soon.

  4. Log in to comment