From cbd35626f7db7855f3b5e2db00d28ecc1554e9f4 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 10 Mar 2017 10:46:03 +0100 Subject: [PATCH] Better fix for XSS in style tags (fa2824fdc) --- program/lib/Roundcube/rcube_utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 50a8c9cc48a..34d5d71936e 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -499,10 +499,10 @@ public static function file2class($mimetype, $filename) public static function xss_entity_decode($content) { $out = html_entity_decode(html_entity_decode($content)); - $out = strip_tags($out); $out = preg_replace_callback('/\\\([0-9a-f]{4})/i', array(self, 'xss_entity_decode_callback'), $out); $out = preg_replace('#/\*.*\*/#Ums', '', $out); + $out = strip_tags($out); return $out; }