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

Issue 193803002: Prevent web content from forging File entries in drag and drop. (Closed)

Created:
6 years, 9 months ago by dcheng
Modified:
6 years, 9 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium, kinuko
Visibility:
Public.

Description

Prevent web content from forging File entries in drag and drop. There are two separate bugs that this and the corresponding Chrome patch aim to address: - On Linux, files and URLs are transferred in the same MIME type, so it's impossible to tell if a filename was set by a trusted source or forged by web content. - DownloadURL triggers the download of potentially cross-origin content. On some platforms, such as Windows, the resulting download is treated as a file drag by Chrome, allowing web content to read cross origin content. In order to prevent web content from doing this, drags initiated by a renderer will be marked as tainted. When tainted drags are over web content, Blink will only allow the resulting filename to be used for navigation, with Chrome enforcing this with the sandbox policy. Unfortunately, this does break some potentially interesting use cases like being able to drag an attachment from Gmail to a file input, but those will have to be separately addressed, if possible. BUG=346135 R=abarth@chromium.org, tony@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169711

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -8 lines) Patch
M Source/core/clipboard/DataObject.h View 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/page/DragController.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/page/DragData.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/page/DragData.cpp View 1 chunk +9 lines, -4 lines 1 comment Download
M Source/web/WebDragData.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M public/platform/WebDragData.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
dcheng
This is pretty ugly, needs a test, and still needs a followup patch in Chrome. ...
6 years, 9 months ago (2014-03-11 00:53:21 UTC) #1
tony
Can you add me to the bug? This is for drag navigations? You might have ...
6 years, 9 months ago (2014-03-11 00:58:38 UTC) #2
dcheng
On 2014/03/11 00:58:38, tony wrote: > Can you add me to the bug? This is ...
6 years, 9 months ago (2014-03-11 01:02:28 UTC) #3
kinuko
> kinuko@, do I need to do any work on the Chrome side to make ...
6 years, 9 months ago (2014-03-11 13:09:31 UTC) #4
tony
This looks reasonable to me. LGTM with a test, although that could be a follow ...
6 years, 9 months ago (2014-03-11 16:53:05 UTC) #5
dcheng
+abarth for OWNERS approval for public/web. I've tested end to end on Linux with the ...
6 years, 9 months ago (2014-03-20 23:35:31 UTC) #6
abarth-chromium
public/ rslgtm
6 years, 9 months ago (2014-03-21 00:01:42 UTC) #7
dcheng
The CQ bit was checked by dcheng@chromium.org
6 years, 9 months ago (2014-03-21 00:03:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dcheng@chromium.org/193803002/1
6 years, 9 months ago (2014-03-21 00:03:22 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-21 01:11:51 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-21 01:11:51 UTC) #11
dcheng
6 years, 9 months ago (2014-03-21 01:19:42 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 manually as r169711 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698