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

Unified Diff: content/browser/web_contents/web_drag_dest_mac.mm

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/browser/web_contents/web_drag_dest_mac.mm
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 8768bed657b59d4bb327364cfd5a66d241d35473..20a26f34091415e85b7f52f47534f18885417f5d 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -253,6 +253,9 @@ int GetModifierFlags() {
DCHECK(pboard);
NSArray* types = [pboard types];
+ data->did_originate_from_renderer =
+ [types containsObject:ui::kChromeDragDummyPboardType];
+
// Get URL if possible. To avoid exposing file system paths to web content,
// filenames in the drag are not converted to file URLs.
ui::PopulateURLAndTitleFromPasteboard(&data->url,

Powered by Google App Engine
This is Rietveld 408576698