Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1365)

Unified Diff: net/base/mime_util.cc

Issue 1617013: Prevent people from adding mime type to supported_non_image_types that will m... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util.cc
===================================================================
--- net/base/mime_util.cc (revision 44051)
+++ net/base/mime_util.cc (working copy)
@@ -239,7 +239,11 @@
"application/json",
"application/x-x509-user-cert",
"multipart/x-mixed-replace"
+ // Note: ADDING a new type here will probably render it AS HTML. This can
+ // result in cross site scripting.
};
+COMPILE_ASSERT(arraysize(supported_non_image_types) == 16,
+ supported_non_images_types_must_equal_16);
// Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript.
// Mozilla 1.8 accepts application/javascript, application/ecmascript, and
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698