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

Unified Diff: Source/core/page/DragController.cpp

Issue 193803002: Prevent web content from forging File entries in drag and drop. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index 726c613ba5e615caa51e3bf7f4eb5898bb5ae128..60850f038f6d3a1ba642776de5ef1e9d7cd95e1c 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -265,7 +265,7 @@ bool DragController::performDrag(DragData* dragData)
return false;
if (m_page->settings().navigateOnDragDrop())
- m_page->mainFrame()->loader().load(FrameLoadRequest(0, ResourceRequest(dragData->asURL())));
+ m_page->mainFrame()->loader().load(FrameLoadRequest(0, ResourceRequest(dragData->asURL(DragData::ConvertFilenames))));
return true;
}
@@ -946,7 +946,7 @@ DragOperation DragController::dragOperation(DragData* dragData)
// attached sheet If this can be determined from within WebCore
// operationForDrag can be pulled into WebCore itself
ASSERT(dragData);
- return dragData->containsURL() && !m_didInitiateDrag ? DragOperationCopy : DragOperationNone;
+ return dragData->containsURL(DragData::ConvertFilenames) && !m_didInitiateDrag ? DragOperationCopy : DragOperationNone;
}
bool DragController::isCopyKeyDown(DragData* dragData)

Powered by Google App Engine
This is Rietveld 408576698