From 77be69fa25b581f0e8fc769a17e7ad133d007308 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 10 Sep 2015 06:08:49 -0400 Subject: [PATCH] Fix issue where Content-Length of some attachments could be set to wrong value causing browser errors (#1490482) --- CHANGELOG | 1 + program/steps/mail/get.inc | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c429736..f27da33 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -65,6 +65,7 @@ - Fix so In-Reply-To header is set also for MDN receipts (#1490523) - Fix missing HTTP_X_FORWARDED_FOR address in generated Received header - Fix XSS issue in drag-n-drop file uploads (#1490530) +- Fix issue where Content-Length of some attachments could be set to wrong value causing browser errors (#1490482) RELEASE 1.1.2 ------------- diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index fba22f9..2cc0d49 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -359,9 +359,8 @@ $sent = true; } else if ($part->size) { - if ($size = (int)$part->d_parameters['size']) { - header("Content-Length: $size"); - } + // Don't be tempted to set Content-Length to $part->d_parameters['size'] (#1490482) + // RFC2183 says "The size parameter indicates an approximate size" $sent = $MESSAGE->get_part_body($part->mime_id, false, 0, -1); } -- Gitblit v1.9.1