Fix XSS problem with unsanitized style tags in messages [CVE-2011-2023]
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 12 Jul 2011 04:59:12 +0000 (04:59 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 12 Jul 2011 04:59:12 +0000 (04:59 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14122 7612ce4b-ef26-0410-bec9-ea0150e637f0

doc/ChangeLog
functions/mime.php

index 64fbb7891e10d9a4362fa4d75c84e31b567ccc24..06cf9065ac34931ae3e5dcca427123a280f5562d 100644 (file)
@@ -365,6 +365,7 @@ Version 1.5.2 - SVN
   - Fixed XSS holes in generic options inputs, XSS hole in the SquirrelSpell
     plugin, and added anti-CSRF protection to the empty trash feature (thanks
     to Nicholas Carlini for finding all these issues). [CVE-2010-4555]
+  - Fixed XSS problem with unsanitized style tags in messages. [CVE-2011-2023]
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
index 57bdf2f2a9a5d66029a46dafffe82f14bd4eca88..1e8fc880c1b82237c8d316e0851b3e6cca0a489b 100644 (file)
@@ -2350,6 +2350,15 @@ function sq_sanitize($body,
             list($free_content, $curpos) =
                 sq_fixstyle($body, $gt+1, $message, $id, $mailbox);
             if ($free_content != FALSE){
+                $attary = sq_fixatts($tagname,
+                                     $attary,
+                                     $rm_attnames,
+                                     $bad_attvals,
+                                     $add_attr_to_tag,
+                                     $message,
+                                     $id,
+                                     $mailbox
+                                     );
                 $trusted .= sq_tagprint($tagname, $attary, $tagtype);
                 $trusted .= $free_content;
                 $trusted .= sq_tagprint($tagname, false, 2);