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

Unified Diff: content/public/common/drop_data.h

Issue 207013003: Mark drags starting in web content as tainted to avoid file path forgery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 6 years, 9 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
Index: content/public/common/drop_data.h
diff --git a/content/public/common/drop_data.h b/content/public/common/drop_data.h
index 74ad79ddd71d1c1d101917889d542de2c841cd1b..423be52f917eca05352b1f9e8652057bafe3dadf 100644
--- a/content/public/common/drop_data.h
+++ b/content/public/common/drop_data.h
@@ -35,6 +35,9 @@ struct CONTENT_EXPORT DropData {
DropData();
~DropData();
+ // Whether this drag originated from a renderer.
+ bool did_originate_from_renderer;
+
// User is dragging a link into the webview.
GURL url;
base::string16 url_title; // The title associated with |url|.
@@ -46,7 +49,9 @@ struct CONTENT_EXPORT DropData {
// a download.
blink::WebReferrerPolicy referrer_policy;
- // User is dropping one or more files on the webview.
+ // User is dropping one or more files on the webview. This field is only
+ // populated if the drag is not renderer tainted, as this allows File access
+ // from web content.
std::vector<FileInfo> filenames;
// Isolated filesystem ID for the files being dragged on the webview.

Powered by Google App Engine
This is Rietveld 408576698