From 377793d67c6b19327212bf2ac5647a4f01a48a48 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 14 Nov 2012 07:34:40 -0500
Subject: [PATCH] Fix XSS vulnerability in handling of text/enriched messages (#1488806)

---
 program/steps/mail/func.inc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 6cb7b75..84d2dd8 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -743,7 +743,9 @@
   else if ($data['type'] == 'enriched') {
     $part->ctype_secondary = 'html';
     require_once(INSTALL_PATH . 'program/lib/enriched.inc');
-    $body = Q(enriched_to_html($data['body']), 'show');
+    $body = enriched_to_html($data['body']);
+    $body = rcmail_wash_html($body, $data, $part->replaces);
+    $part->ctype_secondary = 'html';
   }
   else {
     // assert plaintext

--
Gitblit v1.9.1